You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(web): require User.email and reject SSO sign-ins without an email
Some User rows could be created with a null email — most commonly OAuth/OIDC
accounts created from an identity-provider profile that returned no email. These
rows crashed the Members and Pending Requests pages (`email.toLowerCase()` on a
null) and left unusable identities in the org.
- Make `User.email` required (`String @unique`) with a self-healing migration:
backfill any existing null emails with a deterministic, unique, synthetic
placeholder before applying NOT NULL, so the startup `migrate deploy` can never
fail on instances that already have null rows.
- Reject any sign-in that arrives without an email in the `signIn` callback, so a
null can never reach `createUser`.
- Drop the now-redundant `email!` assertions and tighten the public EE user API
schemas (`email` is no longer nullable); regenerate the OpenAPI spec.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments