Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F325776
mfa_totp.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
mfa_totp.js
View Options
import
Confirm
from
'./confirm.vue'
import
{
mapState
}
from
'vuex'
export
default
{
props
:
[
'settings'
],
data
:
()
=>
({
error
:
false
,
currentPassword
:
''
,
deactivate
:
false
,
inProgress
:
false
// progress peform request to disable otp method
}),
components
:
{
'confirm'
:
Confirm
},
computed
:
{
isActivated
()
{
return
this
.
settings
.
totp
},
...
mapState
({
backendInteractor
:
(
state
)
=>
state
.
api
.
backendInteractor
})
},
methods
:
{
doActivate
()
{
this
.
$emit
(
'activate'
)
},
cancelDeactivate
()
{
this
.
deactivate
=
false
},
doDeactivate
()
{
this
.
error
=
null
this
.
deactivate
=
true
},
confirmDeactivate
()
{
// confirm deactivate TOTP method
this
.
error
=
null
this
.
inProgress
=
true
this
.
backendInteractor
.
mfaDisableOTP
({
password
:
this
.
currentPassword
})
.
then
((
res
)
=>
{
this
.
inProgress
=
false
if
(
res
.
error
)
{
this
.
error
=
res
.
error
return
}
this
.
deactivate
=
false
this
.
$emit
(
'deactivate'
)
})
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 24, 4:23 AM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
95134
Default Alt Text
mfa_totp.js (1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment