MapComplete/app/land.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
492 B
TypeScript
Raw Normal View History

2024-12-31 16:31:01 +01:00
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
})