Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NoQA] Ensure to sign user out if the Authenticate call fails #50388

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Catch error when reauthenticating and sign the user out
mountiny committed Oct 8, 2024

Verified

This commit was signed with the committer’s verified signature.
commit 69ebfd9c94a2031cbc279c4c65c72341000e3f5e
1 change: 1 addition & 0 deletions src/libs/Authentication.ts
Original file line number Diff line number Diff line change
@@ -106,6 +106,7 @@ function reauthenticate(command = ''): Promise<void> {
NetworkStore.setIsAuthenticating(false);
})
.catch((error) => {
// In case the atuhentication call throws error, we need to sign user out as most likely they are missing credentials
NetworkStore.setIsAuthenticating(false);
Log.hmmm('Redirecting to Sign In because we failed to reauthenticate', {error});
redirectToSignIn('passwordForm.error.fallback');