Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

add 2fa at session expired

ammarahm-edf38d940f01d3
diff --git a/apps/mobile/src/components/auth/sessionexpired.js b/apps/mobile/src/components/auth/sessionexpired.js
index 75b8b8c3b..a8d93f0ea 100644
--- a/apps/mobile/src/components/auth/sessionexpired.js
+++ b/apps/mobile/src/components/auth/sessionexpired.js
@@ -131,12 +131,16 @@ export const SessionExpired = () => {
paragraph: 'Please wait while we sync all your data.',
progress: true
});
+ setLoading(false);
} catch (e) {
- callback && callback(true);
- if (e.message === 'MFA Required') {
+ callback && callback(false);
+ if (e.message === 'Multifactor authentication required.') {
TwoFactorVerification.present(async mfa => {
if (mfa) {
+ console.log(mfa);
await login(mfa);
+ } else {
+ setLoading(false);
}
}, e.data);
} else {