|
@@ -118,12 +118,19 @@ export const AuthContextProvider: React.FC = ({children}) => {
|
|
authorized: false,
|
|
authorized: false,
|
|
errorMessage: 'Failed to retrieve user data from server'})
|
|
errorMessage: 'Failed to retrieve user data from server'})
|
|
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
if (response.status == 200) {
|
|
if (response.status == 200) {
|
|
|
|
+=======
|
|
|
|
+ if (response.status === 200) {
|
|
|
|
+>>>>>>> a21b27df012bca6468d78c33a54c88ef7d8156c9
|
|
setAccessToken(accessTokenFromStorage)
|
|
setAccessToken(accessTokenFromStorage)
|
|
setRefreshToken(await getItemAsync(SECURESTORE_REFRESHTOKEN))
|
|
setRefreshToken(await getItemAsync(SECURESTORE_REFRESHTOKEN))
|
|
setNotificationToken(await getItemAsync(SECURESTORE_NOTIFTOKEN))
|
|
setNotificationToken(await getItemAsync(SECURESTORE_NOTIFTOKEN))
|
|
setUserId(await getItemAsync(SECURESTORE_ID))
|
|
setUserId(await getItemAsync(SECURESTORE_ID))
|
|
|
|
+<<<<<<< HEAD
|
|
setAnonUserId('')
|
|
setAnonUserId('')
|
|
|
|
+=======
|
|
|
|
+>>>>>>> a21b27df012bca6468d78c33a54c88ef7d8156c9
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -358,8 +365,6 @@ export const AuthContextProvider: React.FC = ({children}) => {
|
|
authorized: true,
|
|
authorized: true,
|
|
errorMessage: 'Something went wrong when converting anonymous landmarks'
|
|
errorMessage: 'Something went wrong when converting anonymous landmarks'
|
|
})
|
|
})
|
|
-
|
|
|
|
- setAnonUserId('')
|
|
|
|
|
|
|
|
setAlert({
|
|
setAlert({
|
|
title: 'Heads up',
|
|
title: 'Heads up',
|
|
@@ -368,6 +373,8 @@ export const AuthContextProvider: React.FC = ({children}) => {
|
|
type: 'warning'
|
|
type: 'warning'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ setAnonUserId('')
|
|
} catch (error) {
|
|
} catch (error) {
|
|
reportAxiosError("[Authentication]: Error when checking for anonymous landmarks", error);
|
|
reportAxiosError("[Authentication]: Error when checking for anonymous landmarks", error);
|
|
setAlert({
|
|
setAlert({
|