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: IsDuplicatedEmail should filter out identities for the currentUser #1092

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

kangmingtay
Copy link
Member

What kind of change does this PR introduce?

Current behaviour

  • Currently, IsDuplicatedEmail only accepts an email and an aud and uses those fields to check if the auth.identities table has identities with the same email. When this is used in the context of updating a user's email (PUT /user), IsDuplicatedEmail will also include identities that belong to the current user.

@kangmingtay kangmingtay requested a review from a team as a code owner April 20, 2023 11:02
internal/models/user.go Outdated Show resolved Hide resolved
Co-authored-by: Joel Lee <lee.yi.jie.joel@gmail.com>
@kangmingtay kangmingtay merged commit dd2b688 into master Apr 20, 2023
@kangmingtay kangmingtay deleted the km/fix-update-user branch April 20, 2023 16:41
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.60.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot change email to the same value of existing auth.identities record for non-"email" providers
2 participants