Resend email confirmation redirects with malformed URL parameters
I'm using supabase-js. When user clicks on an expired email verification URL it gets redirected to my site with a URL param
error_code=otp_expired (e.g. mysite.com/email-confirmed?error_code=otp_expired&<other params>. I can detect that and allow user to resend the verification email using supabase.auth.resend function. How ever when that OTP expires supabase backend redirects me to the correct endpoint but with incorrect URL params (rather malformed URL). The URL looks like mysite.com/email-confirmed#error_code=otp_expired&<other params>. Yes there's a hash instead of a question mark. Got any idea why's that happening?
Simplified code example
5 Replies
I've tested on both local and hosted supabase and this is the url I get. Both start with hash
Can you show what your
createClient looks like and also where it is being imported from?I have a wrapper function for that but here it is:
Remove your query param (
?email=${email}) from the emailRedirectTo. Also you should get the error in a query string since you are using the ssr library.I've already tried removing the email query param and it did not help.