-
-
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
fix: PASSWORD_RECOVERY event missing #24
Conversation
I'm not sure what's going on with the |
Yeah I'm not sure - any chance you can rebase and push a commit with |
Thanks for the PR btw :) |
I'm sorry to say that I'm not familiar with that process. After a search, it seems you'd typically run the rebase command when on the branch, not |
Perhaps the best option at this point is for me to close this PR and start fresh? |
@j4w8n if you could do that it would be perfect. Feel free to tag me there - will approve ASAP. |
Closing. Will recreate. |
## What kind of change does this PR introduce? Bug fix ## What is the current behavior? When resetting a user's password with an email template which has a URL defining the `type` value as `recovery`, and using the `verifyOtp` method to process the token_hash and type, the SSR server client's `onAuthStateChange` function does not recognize the `PASSWORD_RECOVERY` event that verifyOtp fires. This prevents the code [here](https://github.com/supabase/ssr/blob/main/src/createServerClient.ts#L199-L205) from running; resulting in the new session not being saved to cookies, and the user is not considered logged in. Fixes #21 ## What is the new behavior? User is logged in. ## Additional context Replaces PR #24 Co-authored-by: Jason Creviston <[email protected]>
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
When resetting a user's password with an email template which has a URL defining the
type
value ofrecovery
and usingverifyOtp
in dev code to process thetoken_hash
andtype
, the SSR server client'sonAuthStateChange
function does not recognize thePASSWORD_RECOVERY
event thatverifyOtp
uses in this case. Therefore the new session does not get saved to storage and the user is not logged in, in order to reset their password.What is the new behavior?
User is logged in.
Additional context
Fixes #21