Don't call verify_credentials twice when an account fails

This commit is contained in:
Alex Gleason
2023-06-10 14:15:34 -05:00
parent f2f720ca21
commit 8d8e4f2ee8
2 changed files with 2 additions and 2 deletions

View File

@@ -178,8 +178,7 @@ export const rememberAuthAccount = (accountUrl: string) =>
export const loadCredentials = (token: string, accountUrl: string) =>
(dispatch: AppDispatch) => dispatch(rememberAuthAccount(accountUrl))
.then(() => dispatch(verifyCredentials(token, accountUrl)))
.catch(() => dispatch(verifyCredentials(token, accountUrl)));
.finally(() => dispatch(verifyCredentials(token, accountUrl)));
export const logIn = (username: string, password: string) =>
(dispatch: AppDispatch) => dispatch(getAuthApp()).then(() => {