mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 17:44:44 +02:00
enable 2fa flow
This commit is contained in:
parent
b1afba191e
commit
9e50a580a5
33 changed files with 605 additions and 2084 deletions
|
@ -92,6 +92,15 @@ export async function verifyTotp(
|
|||
|
||||
// TODO: send email to user confirming two-factor authentication is enabled
|
||||
|
||||
if (!valid) {
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.BAD_REQUEST,
|
||||
"Invalid two-factor authentication code"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return response<VerifyTotpResponse>(res, {
|
||||
data: {
|
||||
valid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue