Skip to content

fix: allow linking no-email OIDC identity to phone-only users - #2645

Open
rohanpatel2002 wants to merge 1 commit into
supabase:masterfrom
rohanpatel2002:fix/link-identity-phone-only-no-email
Open

fix: allow linking no-email OIDC identity to phone-only users#2645
rohanpatel2002 wants to merge 1 commit into
supabase:masterfrom
rohanpatel2002:fix/link-identity-phone-only-no-email

Conversation

@rohanpatel2002

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

linkIdentityToUser treats an empty primary email as “identity claimed an unverified email,” so phone-only users linking an email-optional OIDC identity with no email hit sendConfirmation and get 422 EmailNotConfirmed.
Fixes #2640

What is the new behavior?

After UpdateUserEmailFromIdentities, email confirmation / Confirm only runs when GetEmail() != "". Anonymous → non-anonymous still runs. Phone-only + no-email OIDC link succeeds.

Additional context

Regression test: TestLinkIdentityToUser_PhoneOnlyNoEmail.

Skip email confirmation in linkIdentityToUser when the primary email
remains empty after UpdateUserEmailFromIdentities (email-optional OIDC).
Fixes supabase#2640
@rohanpatel2002
rohanpatel2002 requested a review from a team as a code owner July 24, 2026 15:48
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.

linkIdentity rejects phone-only users when an email-optional OIDC identity has no email

1 participant