© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
16 replies
Pursuit of Code

Email Auth with PKCE flow for SSR redirectTo Not Working

1. I have setup a client using supabase/ssr ( I am using sveltekit)
2. I have setup a endpoint for verifying the token_hash at api/auth/callback.
3. I had to change my TOML and .env to match localhost:5173 ( from port 3000 ) to get inBucket to redirect back to the proper site_url.
4. const { error: authError } = await event.locals.supabase.auth.signInWithOtp({
email: form.data.email,
options: {
redirectTo:
${event.url.origin}/api/auth/callback
${event.url.origin}/api/auth/callback

}
});

redirectTo does nothing in context of my +page.server.ts and it seems to only use the environment variables to return the homepage. How am I suppose to use the endpoint for verifying the token then?

I am a little lost here and could use some guidance to get me back on track.

Thank you,
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

PKCE Auth flow - java.lang.IllegalArgumentException
SupabaseSSupabase / help-and-questions
6mo ago
Password Reset PKCE Flow
SupabaseSSupabase / help-and-questions
13mo ago
Password Reset redirectTo Parameter Not Working
SupabaseSSupabase / help-and-questions
6mo ago
Auth Hook for Email Confirmation Not Working - Base64Decoding Error
SupabaseSSupabase / help-and-questions
4mo ago