marmelab / ra-supabase

Supabase adapter for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services.
MIT License
155 stars 27 forks source link

New Supabase SSR to sign in #57

Open Revarh opened 6 months ago

Revarh commented 6 months ago

Hello !

Since Supabase released their new auth system, it seems RA-supabase is not anymore able to provide password creation/reset. When I create a user account, the person receives a confirmation email with an invite to set a password. But in the end the person is redirected to the login page with an error in the URL. And the same happens when a password recovery email is sent:

SITE_URL/#error=access_denied&error_code=403&error_description=Email+link+is+invalid+or+has+expired

After doing some research on that error, it seems Supabase released @supabase/ssr, with a documentation : https://supabase.com/docs/guides/auth/passwords#server-side-rendering-ssr

I can be wrong, but supabase-core may need an update regarging that new package ?

If it is not the case I would appreciate any insight.

Thank you

djhi commented 6 months ago

I actually got the same issue on a personal project built with Remix and @supabase/ssr. Updating the package did not solve it. I'm still investigating. Besides, we do not use @supabase/ssr in ra-supabase and I don't think we should as it's meant for SSR