Skip to content

Commit

Permalink
Add useful information in admin mfa cancelled error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerger committed Jan 3, 2025
1 parent 2f056e0 commit cb74946
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/packages/teleport/src/lib/useMfa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ export function useMfa({ req, isMfaRequired }: MfaProps): MfaState {

const cancelAttempt = () => {
if (mfaResponseRef.current) {
mfaResponseRef.current.resolve(new Error('User cancelled MFA attempt'));
mfaResponseRef.current.resolve(
new Error(
'User cancelled MFA attempt. This is an admin-level API request and requires MFA verification. Please try again with a registered MFA device. If you do not have an MFA device registered, you can add one in the account settings page.'
)
);
}
};

Expand Down

0 comments on commit cb74946

Please sign in to comment.