Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparowhawk committed Dec 4, 2024
1 parent 4ab9b94 commit 2ecec2c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions VAMobile/src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,44 +341,19 @@ export const initializeAuth = async (
refreshAccessToken: () => void,
showActionSheetWithOptions: (options: ActionSheetOptions, callback: (i?: number) => void | Promise<void>) => void,
) => {
const options = ['close']
if (store.getState().demo.demoMode) {
return
}
const pType = await getAuthLoginPromptType()
if (pType === LOGIN_PROMPT_TYPE.UNLOCK) {
showActionSheetWithOptions(
{
title: 'login unlock hit',
options,
cancelButtonIndex: 0,
},
() => {},
)
await finishInitialize(dispatch, false)
await startBiometricsLogin(dispatch, refreshAccessToken, showActionSheetWithOptions)
return
} else {
const refreshToken = await retrieveRefreshToken()
if (refreshToken) {
showActionSheetWithOptions(
{
title: 'login refreshing access token hit',
options,
cancelButtonIndex: 0,
},
() => {},
)
await refreshAccessToken()
} else {
showActionSheetWithOptions(
{
title: 'login clear credentials',
options,
cancelButtonIndex: 0,
},
() => {},
)
await clearStoredAuthCreds()
await finishInitialize(dispatch, false)
}
Expand Down

0 comments on commit 2ecec2c

Please sign in to comment.