© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago•
15 replies
Nareg.T

Supabase Magic Link Authentication Issue:

I'm building a Svelte/SvelteKit app with 2 subdomains (pro.domain.com and domain.com) using Supabase auth with magic links.
Generating magic link:

const { data } = await supabaseAdmin.auth.admin.generateLink({
 type: 'magiclink',
 email,
 options: {
   redirectTo: 'http://localhost:5174/api/auth/callback'
 }
});
const { data } = await supabaseAdmin.auth.admin.generateLink({
 type: 'magiclink',
 email,
 options: {
   redirectTo: 'http://localhost:5174/api/auth/callback'
 }
});


This generates a link like:
http://127.0.0.1:54321/auth/v1/verify?token=<token>&type=magiclink&redirect_to=http://localhost:5174/api/auth/callback

When clicking the link, Supabase redirects to my callback URL but with no auth data:

// My callback endpoint logs:
Full URL: http://localhost:5174/api/auth/callback
Search params: {}

Question: How do I properly handle the Supabase magic link callback to verify the user? What data should I expect from Supabase and how do I access it?
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

Supabase JS and chrome extension magic link authentication
SupabaseSSupabase / help-and-questions
4y ago
Supabase magic link - I broke it!
SupabaseSSupabase / help-and-questions
4y ago
Discourse SSO with Supabase Magic Link login
SupabaseSSupabase / help-and-questions
4y ago
Issue with magic link email templates
SupabaseSSupabase / help-and-questions
5w ago