Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Supabase Email Redirect

How can I make dynamic redirect link in confirmation email after user create account?

For example:

If some user gets to the web site using link www.website.com/project/1 or /project/2 etc. And it doesn't have account and needs to make one. After sign up, user needs to confirm account via email, after confirmation user gets redirected to www.website.com/ in a new tab.

How can I setup email dynamic redirect link to redirect the user to specific nested route?

like image 368
Aleksa_97 Avatar asked Sep 19 '25 20:09

Aleksa_97


1 Answers

You can pass the emailRedirectTo a full url to the page you want it to go to.

await supabase.auth.signUp({ email, password, 
  options: {
    emailRedirectTo: 'http://example.com/project/1' // you will have to make the project part dynamic in whichever way the framework you are using allows you to do this.
  } 
})

You will also need to add these URLs to the Redirect URLs allow list. https://app.supabase.com/project/_/auth/url-configuration

like image 72
Andrew Smith Avatar answered Sep 21 '25 11:09

Andrew Smith