mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2025-12-31 21:56:41 +01:00
「📝」 doc(auth): added doc for 2fa in login
This commit is contained in:
@ -37,8 +37,8 @@ export async function login(request, reply, fastify) {
|
||||
|
||||
const userTOTP = authDB.getUser(user);
|
||||
if (userTOTP.totpEnabled == 1) {
|
||||
if (!request.body.token){
|
||||
return reply.code(401).send({ error: 'Invalid 2FA token' });
|
||||
if (!request.body.token) {
|
||||
return reply.code(402).send({ error: 'Please specify a 2fa token' });
|
||||
}
|
||||
const isValid = verifyTOTP(userTOTP.totpHash, request.body.token);
|
||||
if (!isValid) {
|
||||
|
||||
Reference in New Issue
Block a user