mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-29 18:50:39 +00:00
fix 2fa not working #833
This commit is contained in:
parent
c6fc385289
commit
caa2a34177
1 changed files with 2 additions and 2 deletions
|
@ -263,9 +263,8 @@ exports.entryPage = "dashboard";
|
|||
let user = await login(data.username, data.password);
|
||||
|
||||
if (user) {
|
||||
afterLogin(socket, user);
|
||||
|
||||
if (user.twofaStatus == 0) {
|
||||
afterLogin(socket, user);
|
||||
callback({
|
||||
ok: true,
|
||||
token: jwt.sign({
|
||||
|
@ -284,6 +283,7 @@ exports.entryPage = "dashboard";
|
|||
let verify = notp.totp.verify(data.token, user.twofa_secret, twofa_verification_opts);
|
||||
|
||||
if (verify && verify.delta == 0) {
|
||||
afterLogin(socket, user);
|
||||
callback({
|
||||
ok: true,
|
||||
token: jwt.sign({
|
||||
|
|
Loading…
Reference in a new issue