Skip to content

enforce @cornell.edu domain at auth boundaries - #141

Open
Arsh-S wants to merge 3 commits into
devfrom
arsh-cornell-email-force
Open

enforce @cornell.edu domain at auth boundaries#141
Arsh-S wants to merge 3 commits into
devfrom
arsh-cornell-email-force

Conversation

@Arsh-S

@Arsh-S Arsh-S commented Apr 26, 2026

Copy link
Copy Markdown
Collaborator
  • Backend authenticate middleware: returns 403 for JWTs whose email is not @cornell.edu; authenticateOptional silently drops them
  • Frontend /auth/callback: validates email domain after exchangeCodeForSession and on existing-user path; calls signOut() and clears sb-* cookies on the redirect response when domain check fails
  • New /auth/auth-code-error page with Cornell-only messaging and link back to landing

http://localhost:8080/auth/auth-code-error?reason=non_cornell
image

@vercel

vercel Bot commented Apr 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
curaise Ready Ready Preview, Comment Apr 26, 2026 6:01pm

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants