Android: More work to attempt to get login working

This commit is contained in:
Pieter Vander Vennet 2024-12-19 13:49:14 +01:00
parent fcf8416b5a
commit 969ad74bd9
9 changed files with 99 additions and 61 deletions

View file

@ -1,7 +1,12 @@
import { OsmConnection } from "./Logic/Osm/OsmConnection"
import Constants from "./Models/Constants"
console.log("Authorizing...")
const key = Constants.osmAuthConfig.url + "oauth2_state"
const st =window.localStorage.getItem(key )
console.log("Prev state is",key, st)
new OsmConnection().finishLogin((previousURL) => {
const fallback = window.location.protocol + "//" + window.location.host + "/index.html"
previousURL ??= fallback
if (previousURL.indexOf("/land") > 0) {