Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pleroma-fe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
245
Issues
245
List
Boards
Labels
Service Desk
Milestones
Merge Requests
22
Merge Requests
22
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pleroma
pleroma-fe
Commits
addacf36
Commit
addacf36
authored
Dec 12, 2019
by
Maksim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfa: removed unused code
parent
f70fe28f
Pipeline
#21090
passed with stages
in 3 minutes and 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
9 deletions
+2
-9
src/components/login_form/login_form.js
src/components/login_form/login_form.js
+1
-1
src/components/mfa_form/totp_form.js
src/components/mfa_form/totp_form.js
+0
-1
src/modules/auth_flow.js
src/modules/auth_flow.js
+1
-7
No files found.
src/components/login_form/login_form.js
View file @
addacf36
...
...
@@ -58,7 +58,7 @@ const LoginForm = {
).
then
((
result
)
=>
{
if
(
result
.
error
)
{
if
(
result
.
error
===
'
mfa_required
'
)
{
this
.
requireMFA
({
app
:
app
,
settings
:
result
})
this
.
requireMFA
({
settings
:
result
})
}
else
if
(
result
.
identifier
===
'
password_reset_required
'
)
{
this
.
$router
.
push
({
name
:
'
password-reset
'
,
params
:
{
passwordResetRequested
:
true
}
})
}
else
{
...
...
src/components/mfa_form/totp_form.js
View file @
addacf36
...
...
@@ -7,7 +7,6 @@ export default {
}),
computed
:
{
...
mapGetters
({
authApp
:
'
authFlow/app
'
,
authSettings
:
'
authFlow/settings
'
}),
...
mapState
({
...
...
src/modules/auth_flow.js
View file @
addacf36
...
...
@@ -7,7 +7,6 @@ const RECOVERY_STRATEGY = 'recovery'
// initial state
const
state
=
{
app
:
null
,
settings
:
{},
strategy
:
PASSWORD_STRATEGY
,
initStrategy
:
PASSWORD_STRATEGY
// default strategy from config
...
...
@@ -16,14 +15,10 @@ const state = {
const
resetState
=
(
state
)
=>
{
state
.
strategy
=
state
.
initStrategy
state
.
settings
=
{}
state
.
app
=
null
}
// getters
const
getters
=
{
app
:
(
state
,
getters
)
=>
{
return
state
.
app
},
settings
:
(
state
,
getters
)
=>
{
return
state
.
settings
},
...
...
@@ -55,9 +50,8 @@ const mutations = {
requireToken
(
state
)
{
state
.
strategy
=
TOKEN_STRATEGY
},
requireMFA
(
state
,
{
app
,
settings
})
{
requireMFA
(
state
,
{
settings
})
{
state
.
settings
=
settings
state
.
app
=
app
state
.
strategy
=
TOTP_STRATEGY
// default strategy of MFA
},
requireRecovery
(
state
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment