mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
Fix OTP test endpoint
This commit is contained in:
parent
abbbf0d030
commit
7fce223a6d
@ -67,8 +67,8 @@ module.exports = eggspress('/auth/configure-2fa/:action', {
|
||||
const user = req.user;
|
||||
const svc_otp = x.get('services').get('otp');
|
||||
const code = req.body.code;
|
||||
const delta = svc_otp.verify(user.username, user.otp_secret, code);
|
||||
return { ok: delta !== null, delta };
|
||||
const ok = svc_otp.verify(user.username, user.otp_secret, code);
|
||||
return { ok };
|
||||
};
|
||||
|
||||
actions.enable = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user