auth-js
auth-js copied to clipboard
Confusion on gotrue.js working with redirectTo option for magiclink.
Bug report
This is more clarification is needed and then possibly a document change.
Back in March based on these https://github.com/supabase/gotrue-js/pull/253 , https://github.com/supabase/supabase/issues/5663#issuecomment-1074427708
Implies that gotrue.js can no longer use redirectTo for signIn with magiclink (email only, no password).
Several users in the forums believe it still works, others run into an issue and stop based on the docs.
It seems to still work.
To Reproduce
Setup signIn with email only and no password, redirectTo set to a subpage in website. Website URL set to base and approved redirects set to include the entire URL with subpage. Login and and email is sent with a redirect_to option in the url and does redirect to that subpage in the app...
https://ugccqxxxxxxxxxypbq.supabase.co/auth/v1/verify?token=bF3ZHLRPV9cr9kXWI_NJyQ&type=magiclink&redirect_to=http://mysite.us/page is the URL in the email...
Expected behavior
If redirectTo is still supported for magiclink Docs need to be updated to reflect that.
Screenshots


This user did more specific testing already:
https://github.com/supabase/supabase/issues/5663#issuecomment-1075951729

hey @GaryAustin1, thanks for pointing this out! yeah it works for the example you've mentioned because that's a GET request, we'll update the docs to make sure it's clear.
PR needs to be made against supabase/supabase but transferring to GoTrue-js so we can triage internally
We've updated the docs for this already:
V1: https://supabase.com/docs/reference/javascript/v1/auth-signin V2: https://supabase.com/docs/reference/javascript/auth-signinwithotp
Gonna close this issue but please feel free to reopen or leave any feedback that if we can improve the docs around this