The signIn and signUp functions in the supabase-js...
# help
s
The signIn and signUp functions in the supabase-js client takes an additional parameter where you can state the redirectTo. You can see an example here https://github.com/supabase/supabase/discussions/2760#discussioncomment-1144158
j
Ah perfect, thanks. Is that possible regardless of authtentication provider? I'm only using magic link and email/password atm, and in the example you provided it's only third party providers
s
Its the same no matter the auth provider
It's just the second param to the function
I haven't tested it with magic link though, so that might act differently
j
Ah okey, I will give it a try later. But basically what that param does is to put the correct route I specify in to the url sent in the confirmation-mail as a query param? In the case of email/password
Still can't get it to work. The URL that I make the POST request on sign up looks like this. The param is redirectTo: '/onboarding', but the URL in the confirmation mail is just http://localhost:3000
tried without the slash before onboarding, but still no success
Aaaah, of course. Im stupid. You have to pass the full blown URL as a param, not only /route. I passed 'http://localhost:3000/onboarding' and got it to work. Thanks for letting me rubberduck 😂