-
Notifications
You must be signed in to change notification settings - Fork 402
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
Getting an error of: "User has more than one identity on signup" #1899
Comments
We're experiencing this issue as well and the impact may be quite bad. It seems that if you call https://supabase.com/docs/reference/javascript/auth-admin-updateuserbyid Our organization's existing use of Our workaround has been to update our codepath to pass the auto-confirmation params and then re-update their phone/email. This workaround is pretty cumbersome and leading to a lot of customer annoyance. |
I've been able to reproduce this bug via another method as well that seems to be a common use-case.
We're using the above flow to create users with both emails and phones on sign-up in our application and then letting them sign-in with either email or phone. The above commit 483463e#diff-e47b259bf17912f7ca1f5163ccbfb8a8c23da6c399412ce5aef78b8b684df5e5R330 seems to have broken this use-case. As @TaxNowAndrewY stated above, the assumption that a user only has 1 identity before confirming is wrong and breaks this use-case that previously worked. |
Yup this is a problem. We'll get on a fix for it but earliest deploy looks like it's Monday. Please write to supabase.help anyone that's affected by this so we roll out the fix ASAP on your projects. Please reference this issue! |
@hf Just confirming that the fix is deployed to prod env for supabase? |
@hf Has this fix been deployed yet? We're still seeing the |
hi everyone, this issue should be resolved now as we've deployed v2.168.0 (which contains the fix) to all projects. You can check which auth version your project is on from the [settings page].(https://supabase.com/dashboard/project/_/settings/infrastructure) |
Bug report
Describe the bug
An auth bug of "User has more than one identity on signup" occurs when:
admin.auth.updateUserById
while the user is in the verification stateverifyOtp
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
supabase.admin.auth.udpateUserById
Get an OTP code with
supabase.auth.signInWithOtp
Verify OTP with
supabase.auth.verifyOtp
Expected behavior
This flow was working previously (within the last few days)
Screenshots
If applicable, add screenshots to help explain your problem.
![image](https://private-user-images.githubusercontent.com/146105485/399320713-29ec425e-aa4d-4931-9651-4bc16197c420.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzMzMTYsIm5iZiI6MTczOTUzMzAxNiwicGF0aCI6Ii8xNDYxMDU0ODUvMzk5MzIwNzEzLTI5ZWM0MjVlLWFhNGQtNDkzMS05NjUxLTRiYzE2MTk3YzQyMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQxMTM2NTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kYzY1YjNkOWUxNGI2ZGUwMzQ2ZjQ5ODU1NzVhMDJhYmY0ZGJkMWJhYjNlZGMzM2MwYTg4NmRjMTllM2I3MjIxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Vohm0a9wZJpo67JBJKIYn2zwAO7JV57hml5fKG2A1Ds)
System information
OS: [e.g. macOS, Windows]
Browser (if applies) [e.g. chrome, safari]
Version of supabase-js: [e.g. 6.0.2]
Version of Node.js: [e.g. 10.10.0]
macOS, m2
edge
supabase-js ^2.39.1
node v18.18.0
Additional context
This github commit seems to be where the error is introduced:
483463e#diff-e47b259bf17912f7ca1f5163ccbfb8a8c23da6c399412ce5aef78b8b684df5e5R330
The problem presents itself as the same as this one here:
#1840
But issue 1840 was addressed with
udpateUser
instead ofadmin.auth.updateUserById
. In short, I think the assumption that there can be only 1 identity before a user confirms their email is too broad since we would like to be able to capture this information and have it associated all in the sign up flow.The text was updated successfully, but these errors were encountered: