mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
add 2fa at session expired
This commit is contained in:
@@ -131,12 +131,16 @@ export const SessionExpired = () => {
|
|||||||
paragraph: 'Please wait while we sync all your data.',
|
paragraph: 'Please wait while we sync all your data.',
|
||||||
progress: true
|
progress: true
|
||||||
});
|
});
|
||||||
|
setLoading(false);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
callback && callback(true);
|
callback && callback(false);
|
||||||
if (e.message === 'MFA Required') {
|
if (e.message === 'Multifactor authentication required.') {
|
||||||
TwoFactorVerification.present(async mfa => {
|
TwoFactorVerification.present(async mfa => {
|
||||||
if (mfa) {
|
if (mfa) {
|
||||||
|
console.log(mfa);
|
||||||
await login(mfa);
|
await login(mfa);
|
||||||
|
} else {
|
||||||
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, e.data);
|
}, e.data);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user