From 7cf89c6feafdf3431c92dd1be7d5d8a63b23a781 Mon Sep 17 00:00:00 2001 From: Joywin Bennis <107112207+joywin2003@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:15:02 +0530 Subject: [PATCH] fix: fixed the regex code for sjec students --- src/lib/auth-options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/auth-options.ts b/src/lib/auth-options.ts index 61ee2cc..443d213 100644 --- a/src/lib/auth-options.ts +++ b/src/lib/auth-options.ts @@ -44,7 +44,7 @@ export const authOptions: NextAuthOptions = { const emailPrefix = profile.email.split("@")[0]; // Define BE and MBA patterns - const isBEEmail = /^[2][1-4]\d{3}\..+$/; // Matches 21XXXX, 22XXXX, 23XXXX, 24XXXX for BE + const isBEEmail = /^[2][1-4][a-z]?\d{2}\..+$/; const isMBAEmail = /^[2][3-4]ba\d{3}\..+$/; // Matches 23baXXX, 24baXXX for MBA const isMCAEmail = /^[2][3-4]ca\d{3}\..+$/; // Matches 23maXXX, 24maXXX for MCA