biome format --write
This commit is contained in:
parent
8372348148
commit
9262e803ec
415 changed files with 54076 additions and 17419 deletions
|
|
@ -13,7 +13,7 @@ export const useAuthFlowStore = defineStore('authFlow', {
|
|||
state: () => ({
|
||||
settings: {},
|
||||
strategy: PASSWORD_STRATEGY,
|
||||
initStrategy: PASSWORD_STRATEGY // default strategy from config
|
||||
initStrategy: PASSWORD_STRATEGY, // default strategy from config
|
||||
}),
|
||||
// getters
|
||||
getters: {
|
||||
|
|
@ -31,39 +31,39 @@ export const useAuthFlowStore = defineStore('authFlow', {
|
|||
},
|
||||
},
|
||||
actions: {
|
||||
setInitialStrategy (strategy) {
|
||||
setInitialStrategy(strategy) {
|
||||
if (strategy) {
|
||||
this.initStrategy = strategy
|
||||
this.strategy = strategy
|
||||
}
|
||||
},
|
||||
requirePassword () {
|
||||
requirePassword() {
|
||||
this.strategy = PASSWORD_STRATEGY
|
||||
},
|
||||
requireToken () {
|
||||
requireToken() {
|
||||
this.strategy = TOKEN_STRATEGY
|
||||
},
|
||||
requireMFA ({ settings }) {
|
||||
requireMFA({ settings }) {
|
||||
this.settings = settings
|
||||
this.strategy = TOTP_STRATEGY // default strategy of MFA
|
||||
},
|
||||
requireRecovery () {
|
||||
requireRecovery() {
|
||||
this.strategy = RECOVERY_STRATEGY
|
||||
},
|
||||
requireTOTP () {
|
||||
requireTOTP() {
|
||||
this.strategy = TOTP_STRATEGY
|
||||
},
|
||||
abortMFA () {
|
||||
abortMFA() {
|
||||
this.resetState()
|
||||
},
|
||||
resetState () {
|
||||
resetState() {
|
||||
this.strategy = this.initStrategy
|
||||
this.settings = {}
|
||||
},
|
||||
async login ({ access_token: accessToken }) {
|
||||
async login({ access_token: accessToken }) {
|
||||
useOAuthStore().setToken(accessToken)
|
||||
await window.vuex.dispatch('loginUser', accessToken, { root: true })
|
||||
this.resetState()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue