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/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/ in a new tab.
How can I setup email dynamic redirect link to redirect the user to specific nested route?
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./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./ in a new tab.
How can I setup email dynamic redirect link to redirect the user to specific nested route?
Share Improve this question asked Jun 5, 2023 at 19:53 Aleksa_97Aleksa_97 611 silver badge5 bronze badges1 Answer
Reset to default 11You 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./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./project/_/auth/url-configuration