From 5dcf2212e0fd2c2b366b388eb1af8ce020ba6d3d Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Fri, 12 Jun 2020 16:42:10 -0300 Subject: [PATCH] [FIX] 2FA email - send code again (#2188) Co-authored-by: Diego Mello --- app/lib/rocketchat.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index ecd7ae939..246527a7a 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -346,6 +346,7 @@ const RocketChat = { if (e.data?.error && (e.data.error === 'totp-required' || e.data.error === 'totp-invalid')) { const { details } = e.data; try { + reduxStore.dispatch(setUser({ username: params.user || params.username })); const code = await twoFactor({ method: details?.method || 'totp', invalid: e.data.error === 'totp-invalid' }); return resolve(this.loginTOTP({ ...params, code: code?.twoFactorCode })); } catch {