Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparowhawk committed Dec 10, 2024
1 parent 0393072 commit 748b2de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions VAMobile/src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export const initializeAuth = async (dispatch: AppDispatch, refreshAccessToken:
await startBiometricsLogin(dispatch, refreshAccessToken)
return
} else {
const refreshToken = await retrieveRefreshToken()
const refreshToken = (await api.getRefreshToken()) || (await retrieveRefreshToken())
if (refreshToken) {
await refreshAccessToken()
} else {
Expand All @@ -363,7 +363,7 @@ const startBiometricsLogin = async (dispatch: AppDispatch, refreshAccessToken: (
await logAnalyticsEvent(Events.vama_login_start(true, true))
AsyncStorage.setItem(NEW_SESSION, 'true')
try {
const refreshToken = await retrieveRefreshToken()
const refreshToken = api.getRefreshToken() || (await retrieveRefreshToken())
if (refreshToken) {
loginStart(dispatch, true)
await refreshAccessToken()
Expand Down

0 comments on commit 748b2de

Please sign in to comment.