Android: add passthrough pages

This commit is contained in:
Pieter Vander Vennet 2024-12-31 16:31:01 +01:00
parent 969ad74bd9
commit a34abb702c
6 changed files with 104 additions and 0 deletions

11
app/land.ts Normal file
View file

@ -0,0 +1,11 @@
import { OsmConnection } from "../src/Logic/Osm/OsmConnection"
import Constants from "../src/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((_, token: string) => {
console.log("Login finished, redirecting to passthrough")
window.location.href = "https://app.mapcomplete.org/passthrough.html?oauth_token="+token
})