Magic Link Redirects, Local Development, and Docker
I know there have been other post on this topic but I am still having some issues getting magic link auth redirects to work in my local docker development instance.
Problem: Magic Link redirects and auth flow is broken in my docker development. Links are sent, and appear in InBucket, but upon clicking the link, the user is redirected to the url
My Email Template (prod):
SignIn function:
I also saw a post that mentioned being able to set the site URL in the
And for additional context, here is my
Conclusion: I am still unsure how to approach using magic link logins in docker vs just localhost:3000. Any help or feedback would be appreciated.
Problem: Magic Link redirects and auth flow is broken in my docker development. Links are sent, and appear in InBucket, but upon clicking the link, the user is redirected to the url
http://127.0.0.1:54321/auth/v1/verify?token=pkce_....&type=magiclink&redirect_to=http://127.0.0.1:3000/auth/confirm, and upon landing on the page, the user is not authed. I do see the authenticated user in supabase's auth and my custom profiles (setup via a function and trigger), but the user session is null. In addition to this, the Supbase UI via docker does not have the options to easily edit Redirect URLs, email templates, etc.My Email Template (prod):
SignIn function:
I also saw a post that mentioned being able to set the site URL in the
supbase/config.toml could helpsite_url = "http://localhost:3000"And for additional context, here is my
app/api/auth/confirm/route.tsConclusion: I am still unsure how to approach using magic link logins in docker vs just localhost:3000. Any help or feedback would be appreciated.