forked from MapComplete/MapComplete
Merge branch 'develop' of source.mapcomplete.org:mapcomplete/mapcomplete into develop
This commit is contained in:
commit
2368f292be
4 changed files with 23 additions and 3 deletions
|
@ -583,9 +583,14 @@ export class OsmConnection {
|
|||
}
|
||||
|
||||
private async loginAndroidPolyfill() {
|
||||
const key = "https://www.openstreetmap.orgoauth2_access_token"
|
||||
if(localStorage.getItem(key)){
|
||||
// We are probably already logged in
|
||||
return
|
||||
}
|
||||
const token = await AndroidPolyfill.requestLoginCodes()
|
||||
console.log("Got login token!", token)
|
||||
localStorage.setItem("https://www.openstreetmap.orgoauth2_access_token", token)
|
||||
localStorage.setItem(key, token)
|
||||
if (this.auth.authenticated()) {
|
||||
console.log("Logged in!")
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ export default class FeatureSwitchState extends OsmConnectionFeatureSwitches {
|
|||
|
||||
let testingDefaultValue = false
|
||||
if (
|
||||
!Constants.osmAuthConfig.url.startsWith("https://master.apis.dev.openstreetmap.org") && (location.hostname === "127.0.0.1") && !Utils.runningFromConsole
|
||||
!Constants.osmAuthConfig.url.startsWith("https://master.apis.dev.openstreetmap.org") && !Utils.runningFromConsole && location.hostname === "127.0.0.1"
|
||||
) {
|
||||
testingDefaultValue = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue