Hello. Getting "Email already exists" internal server error
Hello i manually deleted a user from the authentication table to test out the auth flow from sign up however even though the user with that email doesnt exists in the supabase auth table it still gives me "Email already exists" lol. I know if we make the "@supabase/supabase-js" in package.json 2.49.8, it will fix it however my boss is insistent on having latest version does anyone know a permenant solution for this issue? it will help me al;ot


22 Replies
You should check the logs in the dashboard.
If the email is not in the auth table then auth should not error. Has nothing to do with the REST client that I can think of.
Are you sure you are not leaving an email in profiles table or similar and checking that on your own?
Supabase does not normally generate a signup error for existing email with auth.signup unless you are not confirming email.
You have changed the client back and don't get the error? Or you are assuming that it worked and then only getting the error now with a new client.
Once again the REST client does not generate the error, the Auth server on Supabase would.
Once again the REST client does not generate the error, the Auth server on Supabase would.
im 100% sure im getting the information from
auth.users
when i change @supabase/supabase-js version to 2.49.8 in the package.json everything works but when i update i update @supabase/supabase-js to latest, this issue starts happening
idk why this issue occures ://
Have not seen anyone else report this.
I don't see any changes regarding signup in the last releases here: https://github.com/supabase/auth-js/releases
And I don't know how a REST client could impact the error.
You did not answer if checked the supabase api gateway or auth logs for the call and error there.
i dont see any logs ://


Check the api gateway logs.
nothing


You either are not doing an auth call or you did it more than an hour ago based on your filter.
You are not calling that instance if the timeframe of the log is correct.
did these just now in real time
Or you are not generating a REST API call.
really
You mentioned Prisma. Do you somehow check a public table before auth.signUp to see if the user email exists with Prisma?
no the prisma is a fallback
Your logs show you are not calling that instance.
Thru the REST API
Do you have another instance?
no
just one
would u look at the function?
Do you anywhere in your code check if a user email exists with a database call?
Look at what function?
OKAY NVM U were right
i was checking with prisma first
So part of your overall issue is that you should cascade delete or have a delete trigger function on auth.users to clear out your other user table. Probably better with Prisma to do the trigger.
OKAYYYYYY
thats a nice idea!
I have no idea how changing the supabase REST version would have impacted this.
thank u for being so patient with me ðŸ˜