mfa: removed unused code
This commit is contained in:
parent
f70fe28f64
commit
addacf36d1
3 changed files with 2 additions and 9 deletions
|
@ -58,7 +58,7 @@ const LoginForm = {
|
||||||
).then((result) => {
|
).then((result) => {
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
if (result.error === 'mfa_required') {
|
if (result.error === 'mfa_required') {
|
||||||
this.requireMFA({ app: app, settings: result })
|
this.requireMFA({ settings: result })
|
||||||
} else if (result.identifier === 'password_reset_required') {
|
} else if (result.identifier === 'password_reset_required') {
|
||||||
this.$router.push({ name: 'password-reset', params: { passwordResetRequested: true } })
|
this.$router.push({ name: 'password-reset', params: { passwordResetRequested: true } })
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -7,7 +7,6 @@ export default {
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters({
|
...mapGetters({
|
||||||
authApp: 'authFlow/app',
|
|
||||||
authSettings: 'authFlow/settings'
|
authSettings: 'authFlow/settings'
|
||||||
}),
|
}),
|
||||||
...mapState({
|
...mapState({
|
||||||
|
|
|
@ -7,7 +7,6 @@ const RECOVERY_STRATEGY = 'recovery'
|
||||||
|
|
||||||
// initial state
|
// initial state
|
||||||
const state = {
|
const state = {
|
||||||
app: null,
|
|
||||||
settings: {},
|
settings: {},
|
||||||
strategy: PASSWORD_STRATEGY,
|
strategy: PASSWORD_STRATEGY,
|
||||||
initStrategy: PASSWORD_STRATEGY // default strategy from config
|
initStrategy: PASSWORD_STRATEGY // default strategy from config
|
||||||
|
@ -16,14 +15,10 @@ const state = {
|
||||||
const resetState = (state) => {
|
const resetState = (state) => {
|
||||||
state.strategy = state.initStrategy
|
state.strategy = state.initStrategy
|
||||||
state.settings = {}
|
state.settings = {}
|
||||||
state.app = null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
const getters = {
|
const getters = {
|
||||||
app: (state, getters) => {
|
|
||||||
return state.app
|
|
||||||
},
|
|
||||||
settings: (state, getters) => {
|
settings: (state, getters) => {
|
||||||
return state.settings
|
return state.settings
|
||||||
},
|
},
|
||||||
|
@ -55,9 +50,8 @@ const mutations = {
|
||||||
requireToken (state) {
|
requireToken (state) {
|
||||||
state.strategy = TOKEN_STRATEGY
|
state.strategy = TOKEN_STRATEGY
|
||||||
},
|
},
|
||||||
requireMFA (state, { app, settings }) {
|
requireMFA (state, { settings }) {
|
||||||
state.settings = settings
|
state.settings = settings
|
||||||
state.app = app
|
|
||||||
state.strategy = TOTP_STRATEGY // default strategy of MFA
|
state.strategy = TOTP_STRATEGY // default strategy of MFA
|
||||||
},
|
},
|
||||||
requireRecovery (state) {
|
requireRecovery (state) {
|
||||||
|
|
Loading…
Reference in a new issue