Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed the regex code for sjec students #87

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/auth-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading