Skip to content
Snippets Groups Projects
Unverified Commit 780e7a2d authored by Disha Bhardwaj's avatar Disha Bhardwaj Committed by GitHub
Browse files

fix: No feedback given in case of wrong password input in modal confirm password (#28276)

parent ed83998d
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ import { Meteor } from 'meteor/meteor';
import { t } from '../../utils/client';
import { process2faReturn, process2faAsyncReturn } from '../../../client/lib/2fa/process2faReturn';
import { isTotpInvalidError } from '../../../client/lib/2fa/utils';
import { dispatchToastMessage } from '../../../client/lib/toast';
const { call, callAsync } = Meteor;
......@@ -43,6 +44,7 @@ const callAsyncWithTotp =
return result;
} catch (error: unknown) {
if (isTotpInvalidError(error)) {
dispatchToastMessage({ type: 'error', message: t('TOTP Invalid [totp-invalid]') });
throw new Error(twoFactorMethod === 'password' ? t('Invalid_password') : t('Invalid_two_factor_code'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment