Chore: update to OAuth 2.0, fix #1548

This commit is contained in:
Pieter Vander Vennet 2023-09-01 21:36:39 +02:00
parent 8a239503c5
commit 51f08c19a1
5 changed files with 73 additions and 104 deletions

12
src/land.ts Normal file
View 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
})