fix: protect phone number login with 2fa

This commit is contained in:
Bereket Engida
2024-12-19 18:15:27 +03:00
parent 1e61852f39
commit 52eaa69c62

View File

@@ -240,7 +240,8 @@ export const twoFactor = (options?: TwoFactorOptions) => {
matcher(context) {
return (
context.path === "/sign-in/email" ||
context.path === "/sign-in/username"
context.path === "/sign-in/username" ||
context.path === "/sign-in/phone-number"
);
},
handler: createAuthMiddleware(async (ctx) => {