mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
549dbf41c9
commit
61fa88d5a1
@ -252,17 +252,13 @@ const updaterResponse = (code) => {
|
||||
*/
|
||||
const validate2faAuthentication = (informationUser) => {
|
||||
let rtn = false
|
||||
if (
|
||||
informationUser.TEMPLATE &&
|
||||
informationUser.TEMPLATE.SUNSTONE &&
|
||||
informationUser.TEMPLATE.SUNSTONE[default2FAOpennebulaVar]
|
||||
) {
|
||||
if (informationUser?.TEMPLATE?.SUNSTONE?.[default2FAOpennebulaVar]) {
|
||||
/*********************************************************
|
||||
* Validate 2FA
|
||||
*********************************************************/
|
||||
|
||||
if (tfatoken.length <= 0) {
|
||||
updaterResponse(httpResponse(accepted))
|
||||
updaterResponse(httpResponse(accepted, { id: informationUser?.ID }))
|
||||
} else {
|
||||
const secret = informationUser.TEMPLATE.SUNSTONE[default2FAOpennebulaVar]
|
||||
if (!check2Fa(secret, tfatoken)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user