-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix useMfa
error handling
#50844
Fix useMfa
error handling
#50844
Conversation
Can we use the American-English spelling (canceled) instead of the British-English spelling (cancelled)? |
01d553d
to
dd33f6a
Compare
dd33f6a
to
6de6710
Compare
}: Props) { | ||
if (!challenge && attempt.status !== 'error') return; | ||
const showMfaDialog = | ||
!!challenge || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just want to make sure this is show mfa dialog if there IS a challenge
? i think that not
is throwing me off (brain farting)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't know why I thought it was more readable this way, updated to:
const showError =
attempt.status === 'error' && !(attempt.error instanceof MfaCanceledError);
if (!challenge && !showError) return;
The original error is now displayed in the MFA dialog, and the
MFA canclled by user
error is displayed at the top level after the MFA dialog is closed:Fixes #50582
This will be backported with #50529