forked from MapComplete/MapComplete
Chore: update to OAuth 2.0, fix #1548
This commit is contained in:
parent
8a239503c5
commit
51f08c19a1
5 changed files with 73 additions and 104 deletions
12
src/land.ts
Normal file
12
src/land.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import {OsmConnection} from "./Logic/Osm/OsmConnection";
|
||||
|
||||
console.log("Authorizing...");
|
||||
new OsmConnection().finishLogin(previousURL => {
|
||||
const fallback = window.location.protocol+"//"+window.location.host+"/index.html"
|
||||
previousURL ??= fallback
|
||||
if(previousURL.indexOf("/land") > 0){
|
||||
previousURL = fallback
|
||||
}
|
||||
console.log("Redirecting to", previousURL)
|
||||
window.location.href = previousURL
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue