From 6c75d12cc73d0192f07a15043a9486b6eabf9058 Mon Sep 17 00:00:00 2001 From: Zai Shi Date: Tue, 11 Feb 2025 11:43:43 -0800 Subject: [PATCH] fixed verification code handler error when user is deleted --- .../api/latest/auth/otp/sign-in/verification-code-handler.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/backend/src/app/api/latest/auth/otp/sign-in/verification-code-handler.tsx b/apps/backend/src/app/api/latest/auth/otp/sign-in/verification-code-handler.tsx index cb6710d30..1da5ef30c 100644 --- a/apps/backend/src/app/api/latest/auth/otp/sign-in/verification-code-handler.tsx +++ b/apps/backend/src/app/api/latest/auth/otp/sign-in/verification-code-handler.tsx @@ -77,6 +77,8 @@ export const signInVerificationCodeHandler = createVerificationCodeHandler({ user = await usersCrudHandlers.adminRead({ tenancy, user_id: data.user_id, + // This might happen if the user was deleted but the code is still valid + allowedErrorTypes: [KnownErrors.UserNotFound], }); }