Skip to content

fix(providers): normalize email in WebAuthn getUserInfo#13415

Open
iruizsalinas wants to merge 1 commit intonextauthjs:mainfrom
iruizsalinas:fix/webauthn-normalize-email
Open

fix(providers): normalize email in WebAuthn getUserInfo#13415
iruizsalinas wants to merge 1 commit intonextauthjs:mainfrom
iruizsalinas:fix/webauthn-normalize-email

Conversation

@iruizsalinas
Copy link
Copy Markdown

The WebAuthn provider's getUserInfo passes the raw email straight to adapter.getUserByEmail, while the email and OAuth providers both normalize it first (lowercase + trim in send-token.ts, .toLowerCase() in the OAuth callback).

On adapters where getUserByEmail is case-sensitive, a user who registers a passkey with [email protected] won't match when they later sign in with [email protected], and can end up with a duplicate account.

Just aligning WebAuthn with how the other providers already handle email input.

@github-actions github-actions Bot added providers core Refers to `@auth/core` labels Apr 14, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

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

Project Deployment Actions Updated (UTC)
auth-docs Ready Ready Preview, Comment Apr 14, 2026 3:03pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
next-auth-docs Ignored Ignored Apr 14, 2026 3:03pm

Request Review

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

@iruizsalinas is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

core Refers to `@auth/core` providers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant