Cancel email change request?
I'm trying to figure a way to allowing the user to cancel their email change request. I do have a function that updates these values:
However, something seems to break, and unable to log back in due to a database schema error.
7 Replies
Also I know you're not really supposed to touch the auth table, but I can't figure out any other way to cancel the email change request
Here is where I got the idea from for the above snippet: https://github.com/orgs/supabase/discussions/7208
Why would you need to cancel the email change request? if the user doesn't confirm the new email by clicking the links the existing email will continue to work as normal.
Because in my UI it displays if there is a pending email change. I need a way to cancel the email change. Surely there must be a way to achieve this
There is none from any of the SDKs perspective, but you can update the columns in the
auth.users
table if you wish. But as I said before just like any other service when you do email change, your old email continues to work unless you click the actual link that was sent to you and that link expires after a day if I remember correctly.Yes I'm aware that the old email still works. However, I'm unsure what column in auth.users to change, since it seems to break the login of the user account, when I set email_change to null:
email_change has to be empty string if you look at an auth.users row without an email change having been requested. But this will be the problem with changing rows yourself. The way they work could change. Unless Supabase shows the columns in documentation being used (I don't know if there is a list) they could change.
yep you're right, I just figured it out this very second