© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4mo ago•
5 replies
Doctone

Password reset redirectTo URL not including path component

When using resetPasswordForEmail(), the redirectTo URL is being truncated and not including the path I specify.

Code:
  const { error } = await supabase.auth.resetPasswordForEmail(email, {
    redirectTo: import.meta.env.VITE_APP_URL + "/authenticate/updatePassword",
  });
  const { error } = await supabase.auth.resetPasswordForEmail(email, {
    redirectTo: import.meta.env.VITE_APP_URL + "/authenticate/updatePassword",
  });

Expected redirect URL:
https://my.app/authenticate/updatePassword

Actual URL in email:
https://xxx.supabase.co/auth/v1/verify?token=...&type=recovery&redirect_to=https://my.app/

The path /authenticate/updatePassword is being stripped. VITE_APP_URL is correctly set to https://my.app/.

Config:
- Using Vite
- Email confirmation is working ✅
- Only the redirect path is missing

Is there a configuration setting I'm missing, or do redirect URLs need to be added to an allowlist somewhere?

It successfully sends the email to the user ✅
The redirect URL is almost correct but not quite, the final part of the url ends up missing my "/authenticate/updatePassword":
https://asdlfkassdlkfj.supabase.co/auth/v1/verify?token=5fd9ffa7464a513c1977ac88503c52264691488e2e882c479490278d&type=recovery&redirect_to=https://my.app/
https://asdlfkassdlkfj.supabase.co/auth/v1/verify?token=5fd9ffa7464a513c1977ac88503c52264691488e2e882c479490278d&type=recovery&redirect_to=https://my.app/

my VITE_APP_URL is correctly identified as
https://my.app/
https://my.app/
but the string i've added on the end is not being appended.

My reset password template is:
<h2>Reset Password</h2>

<p>Follow this link to reset the password for your user:</p>
<p><a href="{{ .ConfirmationURL }}">Reset Password</a></p>
<h2>Reset Password</h2>

<p>Follow this link to reset the password for your user:</p>
<p><a href="{{ .ConfirmationURL }}">Reset Password</a></p>
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Password Reset redirectTo Parameter Not Working
SupabaseSSupabase / help-and-questions
6mo ago
Password Reset Redirect URL
SupabaseSSupabase / help-and-questions
4y ago
Update password (not reset password page)
SupabaseSSupabase / help-and-questions
4mo ago
Password reset
SupabaseSSupabase / help-and-questions
6mo ago