-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password Recovery Does Not Update Auth Session #21
Comments
If you look in the auth-js code, the Even when it's working with 0.3.0, the code verifier cookie just sits in the browser, since it never gets used. https://github.com/supabase/auth-js/blob/master/src/GoTrueClient.ts#L1635 |
I fixed mine. Instead of using |
I think for the time being I'm going to downgrade to 0.3.0, but changing the type like you said does work as I would expect. I haven't delved into the actual code behind SSR 0.4.0, but it's interesting that this only seems to fail with I will help out with this however I can, so if this gets any visibility from anyone, please let me know what I can do to help out -whether it's updating the docs or anything else. |
It took me forever to figure out why this is happening. The However, the new ssr 0.4.0 code does not look for the PASSWORD_RECOVERY event in it's So, the solution is to add UPDATE: I created a PR to fix. |
Bug report
Describe the bug
Password Recovery flow does not work as expected for
@supabase/ssr
v0.4.0, whereas the same code works for v0.3.0. Confirmations, invitations, and magic links seem to work just fine, but password recovery does not. It does not update the session if the type is set to "recovery".To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=recovery&next=/change-password
@supabase/ssr
is v0.4.0@supabase/ssr
to v0.3.0Expected behavior
The password recovery flow for v0.4.0 of
@supabase/ssr
, as detailed here, should authenticate the user and redirect them to the "/change-password" page.System information
Additional context
I followed these guides:
https://supabase.com/docs/guides/auth/server-side/sveltekit
https://supabase.com/docs/guides/auth/passwords?queryGroups=flow&flow=pkce&queryGroups=framework&framework=sveltekit#resetting-a-password
A reference repo using v0.3.0 I used to confirm that the code worked, but updating it to v0.4.0 fails: https://github.com/j4w8n/sveltekit-supabase-ssr
The text was updated successfully, but these errors were encountered: