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.
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.