© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
5 replies
patrick

Problem handling magic link sign in

Hi, I'm trying to set up magic link login in my NextJS app. I'm using supabaseClient.auth.signInWithOtp, but when I click the magic link inside the email, I get rerouted to http://localhost:3000/#access_token="ACCESS_TOKEN"&token_type=bearer&type=magiclink, however I'm not sure how I should handle the access token on my side.

I'm making use of @supabase/auth-helpers-nextjs and the withPageAuth wrapper, so trying to protect pages using that, I'm wondering if I need to pass the token somewhere in there to store it, or how can I persist the session in this way?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Sign in with Magic Link React Native
SupabaseSSupabase / help-and-questions
4y ago
pkce flow for passwordless sign in problem with magic link url
SupabaseSSupabase / help-and-questions
8mo ago
E-mail sign in vs Magic link - the user object
SupabaseSSupabase / help-and-questions
6mo ago
Sign in problem
SupabaseSSupabase / help-and-questions
5mo ago