mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +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.',
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user