[FIX] 2FA email - send code again (#2188)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
88f69717ea
commit
5dcf2212e0
|
@ -346,6 +346,7 @@ const RocketChat = {
|
||||||
if (e.data?.error && (e.data.error === 'totp-required' || e.data.error === 'totp-invalid')) {
|
if (e.data?.error && (e.data.error === 'totp-required' || e.data.error === 'totp-invalid')) {
|
||||||
const { details } = e.data;
|
const { details } = e.data;
|
||||||
try {
|
try {
|
||||||
|
reduxStore.dispatch(setUser({ username: params.user || params.username }));
|
||||||
const code = await twoFactor({ method: details?.method || 'totp', invalid: e.data.error === 'totp-invalid' });
|
const code = await twoFactor({ method: details?.method || 'totp', invalid: e.data.error === 'totp-invalid' });
|
||||||
return resolve(this.loginTOTP({ ...params, code: code?.twoFactorCode }));
|
return resolve(this.loginTOTP({ ...params, code: code?.twoFactorCode }));
|
||||||
} catch {
|
} catch {
|
||||||
|
|
Loading…
Reference in New Issue