Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F325635
recovery_form.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
recovery_form.js
View Options
import
mfaApi
from
'../../services/new_api/mfa.js'
import
{
mapState
,
mapGetters
,
mapActions
,
mapMutations
}
from
'vuex'
export
default
{
data
:
()
=>
({
code
:
null
,
error
:
false
}),
computed
:
{
...
mapGetters
({
authSettings
:
'authFlow/settings'
}),
...
mapState
({
instance
:
'instance'
,
oauth
:
'oauth'
})
},
methods
:
{
...
mapMutations
(
'authFlow'
,
[
'requireTOTP'
,
'abortMFA'
]),
...
mapActions
({
login
:
'authFlow/login'
}),
clearError
()
{
this
.
error
=
false
},
submit
()
{
const
{
clientId
,
clientSecret
}
=
this
.
oauth
const
data
=
{
clientId
,
clientSecret
,
instance
:
this
.
instance
.
server
,
mfaToken
:
this
.
authSettings
.
mfa_token
,
code
:
this
.
code
}
mfaApi
.
verifyRecoveryCode
(
data
).
then
((
result
)
=>
{
if
(
result
.
error
)
{
this
.
error
=
result
.
error
this
.
code
=
null
return
}
this
.
login
(
result
).
then
(()
=>
{
this
.
$router
.
push
({
name
:
'friends'
})
})
})
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 24, 4:18 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
94759
Default Alt Text
recovery_form.js (1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment