fix: possible two factor secret bug

This commit is contained in:
Sérgio Salgado 2021-04-20 00:06:37 +01:00 committed by Josh Harvey
parent 7680b2f85a
commit 2062413c75
4 changed files with 8 additions and 7 deletions

View file

@ -186,12 +186,12 @@ const disableUser = (code, id, context) => {
const createResetPasswordToken = (code, userID, context) => {
const action = () => users.createAuthToken(userID, 'reset_password')
return executeProtectedAction(code, id, context, action)
return executeProtectedAction(code, userID, context, action)
}
const createReset2FAToken = (code, userID, context) => {
const action = () => users.createAuthToken(userID, 'reset_twofa')
return executeProtectedAction(code, id, context, action)
return executeProtectedAction(code, userID, context, action)
}
const createRegisterToken = (username, role) => {