aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_settings/mfa.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/user_settings/mfa.js')
-rw-r--r--src/components/user_settings/mfa.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/user_settings/mfa.js b/src/components/user_settings/mfa.js
index 2acee862..3090138a 100644
--- a/src/components/user_settings/mfa.js
+++ b/src/components/user_settings/mfa.js
@@ -7,6 +7,7 @@ import { mapState } from 'vuex'
const Mfa = {
data: () => ({
settings: { // current settings of MFA
+ available: false,
enabled: false,
totp: false
},
@@ -106,7 +107,7 @@ const Mfa = {
this.setupState.setupOTPState = 'confirm'
})
},
- doConfirmOTP () { // handler confirm enable OTP
+ doConfirmOTP () { // handler confirm enable OTP
this.error = null
this.backendInteractor.mfaConfirmOTP({
token: this.otpConfirmToken,
@@ -139,7 +140,9 @@ const Mfa = {
// fetch settings from server
async fetchSettings () {
let result = await this.backendInteractor.fetchSettingsMFA()
+ if (result.error) return
this.settings = result.settings
+ this.settings.available = true
return result
}
},