From 7f2784c5424c1c641269bafb94ff76c36447b382 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Tue, 24 Nov 2020 22:51:23 +0800 Subject: [PATCH] clear webauthn config and data when clear token and settings --- src/views/mobile/Login.vue | 4 ++++ src/views/mobile/Settings.vue | 1 + src/views/mobile/Signup.vue | 2 ++ src/views/mobile/Unlock.vue | 1 + 4 files changed, 8 insertions(+) diff --git a/src/views/mobile/Login.vue b/src/views/mobile/Login.vue index 3302b4a5..62234028 100644 --- a/src/views/mobile/Login.vue +++ b/src/views/mobile/Login.vue @@ -187,6 +187,8 @@ export default { if (self.$settings.isEnableApplicationLock()) { self.$settings.setEnableApplicationLock(false); + self.$settings.setEnableApplicationLockWebAuthn(false); + self.$user.clearWebAuthnConfig(); } self.$user.updateTokenAndUserInfo(data.result); @@ -264,6 +266,8 @@ export default { if (self.$settings.isEnableApplicationLock()) { self.$settings.setEnableApplicationLock(false); + self.$settings.setEnableApplicationLockWebAuthn(false); + self.$user.clearWebAuthnConfig(); } self.$user.updateTokenAndUserInfo(data.result); diff --git a/src/views/mobile/Settings.vue b/src/views/mobile/Settings.vue index fa2e27a8..02f531a2 100644 --- a/src/views/mobile/Settings.vue +++ b/src/views/mobile/Settings.vue @@ -185,6 +185,7 @@ export default { } self.$user.clearTokenAndUserInfo(); + self.$user.clearWebAuthnConfig(); self.$exchangeRates.clearExchangeRates(); self.$settings.clearSettings(); self.$locale.init(); diff --git a/src/views/mobile/Signup.vue b/src/views/mobile/Signup.vue index eac5a4a2..421b11d1 100644 --- a/src/views/mobile/Signup.vue +++ b/src/views/mobile/Signup.vue @@ -159,6 +159,8 @@ export default { if (self.$settings.isEnableApplicationLock()) { self.$settings.setEnableApplicationLock(false); + self.$settings.setEnableApplicationLockWebAuthn(false); + self.$user.clearWebAuthnConfig(); } if (self.$utilities.isString(data.result.token)) { diff --git a/src/views/mobile/Unlock.vue b/src/views/mobile/Unlock.vue index 0a761fad..479ee012 100644 --- a/src/views/mobile/Unlock.vue +++ b/src/views/mobile/Unlock.vue @@ -113,6 +113,7 @@ export default { self.$confirm('Are you sure you want to re-login?', () => { self.$user.clearTokenAndUserInfo(); + self.$user.clearWebAuthnConfig(); self.$exchangeRates.clearExchangeRates(); self.$settings.clearSettings(); self.$locale.init();