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:
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.
Bug report
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:
updateUser({ email: "my-email@gmail.com" })
updateUser({ email: "my-email@gmail.com" })
again.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
Additional context
Add any other context about the problem here.