auth icon indicating copy to clipboard operation
auth copied to clipboard

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

Open rohanpatel2002 opened this issue 4 months ago • 0 comments

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.

rohanpatel2002 avatar Jul 24 '26 15:07 rohanpatel2002