supabase / supabase

The open source Firebase alternative. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
https://supabase.com
Apache License 2.0
73.67k stars 7.12k forks source link

Email Auth with PKCE flow only working in production #19980

Closed probablykasper closed 3 months ago

probablykasper commented 10 months ago

Bug report

Link

https://supabase.com/docs/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr?framework=sveltekit

Describe the problem

I've followed the "Email Auth with PKCE flow" guide, and I figured out how to set the email URL templeate in production. But it wasn't clear to me how to do this in development, as there's no option for it in Studio.

Describe the improvement

Studio could keep the page shown in development too, but instead show an explanation of where to set the options. The guide could explain how to set the URL template this in both production and development

stuffmattdoes commented 10 months ago

I'm having the same issue. I'm using supabase & remix, but the flow is the same.

Unfortunately, I had to revert to @supabase/auth-helpers-remix, as @supabase/ssr is still in beta and doesn't seem ready for local development just yet.

Additionally I had to downgrade my project's supabase CLI version from 1.127.3 to 1.34.5 (i.e. npm i -D supabase@1.34.5). The supabase CLI determines which local studio version is running, and the downgraded version reverts back to the previously working implicit grant flow.

Check out Supabase's "Auth 2.0" announcement, which details the change from implicit grant flow to the PKCE flow.

silentworks commented 4 months ago

There are guides in the docs showing how to update the email templates in your local Supabase here https://supabase.com/docs/guides/cli/customizing-email-templates

Hallidayo commented 3 months ago

Hi all, We’re going to close this one due to inactivity. Please feel free to reopen if you’re still having issues here or open a new issue.