-
Notifications
You must be signed in to change notification settings - Fork 1.5k
full_name not saved when doing signup with email verification #80
Comments
@AdrianKrebs, any updates? I'm having the same issue. |
Im having the same issue. Any news? :) |
When I turn the email verification off in supabase, it works. That is obviously just a workaround and I would love to hear the proper solution. |
This has to do something with the row level security. Only signedIn users are able to update themselves. I wonder how we can solve this with email verification turned on. |
I added an API route to my application that uses the admin client to update the full_name field bypassing RLS. Since the update is done server side it protects the service_role_key but I guess it might still be possible for someone to use the API route to maliciously update a different user's full_name. Thoughts on solving the issue this way? What alternatives did you consider? |
What if we create an admin api route for the signup itself? This should also include the update of the full name. I think this could be a possible solution to prevent the problem because it's not possible to signup the same person multiple times. What do you think of this? |
@AdrianKrebs @ingokpp the proper way (respecting RLS) would be to create a later interface using JWT tokens (signUp only includes email and password) and after using the receive token via link "confirm subscription" to call the function for update (using local storage or cookie to save data as full_name in this example), @reesef a smart solution, it's an exception that supabase should improve, I struggled for 2 days to understand and thanks to @zernonia's help managed to explain me and understand the flow, we need to improvements to supabase documentation and examples |
I can't even get the user when I sign up |
The signup works fine, and I see the name and the user printed out (I added the log statements). However, the patch request to update the name on the user table returns a 404:
The user exists, so why is the update failing with a 404?
The text was updated successfully, but these errors were encountered: