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

Update user email that previously had no email fails #737

Open
2 tasks done
Cali93 opened this issue Jul 18, 2023 · 0 comments
Open
2 tasks done

Update user email that previously had no email fails #737

Cali93 opened this issue Jul 18, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Cali93
Copy link

Cali93 commented Jul 18, 2023

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

If a user signed up with a provider other than email and wants to later on add his email, if the change email confirmation expires it errors out and he can't resend a new confirmation email by calling updateUser again.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Sign up with any provider other than email
  2. Call updateUser({ email: "[email protected]" })
  3. Change email confirmation expires, user calls updateUser({ email: "[email protected]" }) again.
  4. Get error duplicate key value violates unique constraint "identities_pkey"

Expected behavior

This code is checking the email field of the user before creating an identity. But it should really be checking to see if there is an email identity for that user.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • Version of supabase-js: 2.26.0
  • Version of Node.js: 18

Additional context

Add any other context about the problem here.

@Cali93 Cali93 added the bug Something isn't working label Jul 18, 2023
@Cali93 Cali93 changed the title Update user that had no email fails Update user email that previously had no email fails Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant