enable 2fa flow

This commit is contained in:
Milo Schwartz 2024-12-23 23:59:15 -05:00
parent b1afba191e
commit 9e50a580a5
No known key found for this signature in database
33 changed files with 605 additions and 2084 deletions

View file

@ -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,