Update SSO token before attempting to load profile

pull/12/head^2
Manuel Kasper 2022-08-06 17:26:30 +02:00
rodzic 1dc744460a
commit a36761b70c
1 zmienionych plików z 13 dodań i 10 usunięć

Wyświetl plik

@ -28,6 +28,8 @@ export default {
},
mounted () {
if (this.homeQth === null) {
this.$keycloak.updateToken(60)
.success(() => {
this.$keycloak.loadUserProfile()
.success(profile => {
if (profile.attributes.Lat && profile.attributes.Lat[0] && profile.attributes.Lon && profile.attributes.Lon[0]) {
@ -40,6 +42,7 @@ export default {
this.$store.commit('setHomeQth', undefined)
}
})
})
} else {
this.calculate()
}