Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(experience): fix email/phone identifier conflict handling logic during user registration #7041

Merged
merged 2 commits into from
Feb 17, 2025

Conversation

simeng-li
Copy link
Contributor

Summary

fix the email/phone identifier conflict handling logic during user registration.

When a user attempts to register with an email/phone that already exists:

Previous Behavior

"Sign in instead" modal will be shown when:

  • The email/phone identifier has been verified through a verification code validation
  • Identifier type (email/phone) was enabled in sign-in methods

This caused an issue when:

  • Only password authentication method was enabled in the sign-in method settings.
  • When users clicked "Sign in instead" action button, the API call will throw an sign-in method not enabled error. Which is confusing for the user.

Expected behavior: Show the "Email/phone already exists" error modal directly. If only password authentication is enabled. User should not be able to sign in with email/phone directly.

Fixed Behavior

Shows the "Sign in instead" modal if:

  • The email/phone identifier type is enabled in the sign-in method settings and the verification code is enabled for the identifier.

Otherwise, shows the "Email/phone already exists" error modal directly.

Testing

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@simeng-li simeng-li marked this pull request as ready for review February 14, 2025 06:33
@simeng-li simeng-li requested a review from gao-sun as a code owner February 14, 2025 06:33
@simeng-li simeng-li requested review from a team and charIeszhao and removed request for a team February 14, 2025 06:33
Copy link

github-actions bot commented Feb 14, 2025

COMPARE TO master

Total Size Diff 📈 +1.42 KB

Diff by File
Name Diff
.changeset/loud-beds-obey.md 📈 +1.09 KB
packages/experience/src/containers/VerificationCode/use-register-flow-code-verification.ts 📈 +255 Bytes
packages/experience/src/hooks/use-sie.ts 📈 +82 Bytes

@simeng-li simeng-li requested a review from a team February 14, 2025 06:34
…ic during user registration

fix the email/phone identifier conflict handling logic during user registration
@simeng-li simeng-li force-pushed the simeng-experience-registration-fix branch from ddfe461 to 67597aa Compare February 14, 2025 07:12
@simeng-li simeng-li enabled auto-merge (squash) February 17, 2025 03:14
@simeng-li simeng-li merged commit 28643c1 into master Feb 17, 2025
37 checks passed
@simeng-li simeng-li deleted the simeng-experience-registration-fix branch February 17, 2025 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants