You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the auth.updateUser function to change a user's email address, the emailRedirectTo parameter is expected to specify the URL to which the user is redirected after confirming the email change. However, this value does not carry over to the confirmation email link. Instead, the link always ends with the base site URL, ignoring the specified emailRedirectTo value.
To Reproduce
Set localhost site URL and localhost wildcard for redirect URLs in supabase/config.toml
Expected the emailRedirectTo value to carry over to the email link when using auth.updateUser, but it does not. Instead the link just always ends with http://localhost:3000/ in the email:
(e.g., ...&type=email_change&redirect_to=http://localhost:3000/)
System information
OS: macOS
Browser: Chrome
Version of supabase-js: 1.191.3
Version of Node.js: 20.16.0
The text was updated successfully, but these errors were encountered:
@jrpersico what did you enter in your email template for the "change email address"? As it also depends on it.
What I do have is:
the site url as : mydomain.com
the additional url: http://localhost:3002/**
and in my email template I have this: {{ .RedirectTo }}?token_hash={{ .TokenHash }}&type=email_change
Which does not work. I get redirected to the localhost as expected, but not to the right page specified in my emailRedirectTo
I would like the redirecto to work regardless of my siteurl variable, so both when i'm on local or when i'm on prod.
Bug report
An open, unanswered discussion from nearly a year ago also addresses this issue:
GitHub Discussion #18810
Related documentation:
Supabase Auth UpdateUser
Describe the bug
When using the
auth.updateUser
function to change a user's email address, theemailRedirectTo
parameter is expected to specify the URL to which the user is redirected after confirming the email change. However, this value does not carry over to the confirmation email link. Instead, the link always ends with the base site URL, ignoring the specifiedemailRedirectTo
value.To Reproduce
.ConfirmationURL
with HTML email template in supabase/templates/email_change.htmlExpected behavior
Expected the
emailRedirectTo
value to carry over to the email link when using auth.updateUser, but it does not. Instead the link just always ends with http://localhost:3000/ in the email:(e.g.,
...&type=email_change&redirect_to=http://localhost:3000/
)System information
The text was updated successfully, but these errors were encountered: