supabase / ssr

Supabase clients for use in server-side rendering frameworks.
MIT License
71 stars 7 forks source link

fix: PASSWORD_RECOVERY event missing #24

Closed j4w8n closed 4 months ago

j4w8n commented 4 months ago

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 of recovery and using verifyOtp in dev code to process the token_hash and type, the SSR server client's onAuthStateChange function does not recognize the PASSWORD_RECOVERY event that verifyOtp 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

j4w8n commented 4 months ago

I'm not sure what's going on with the check-conventional-commits check.

J0 commented 4 months ago

Yeah I'm not sure - any chance you can rebase and push a commit with feat: or fix? Not sure if the merge commit I made is messing with the check

J0 commented 4 months ago

Thanks for the PR btw :)

j4w8n commented 4 months ago

Yeah I'm not sure - any chance you can rebase and push a commit with feat: or fix? Not sure if the merge commit I made is messing with the check

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 main: git rebase main. But it gives me a merge conflict.

image image

j4w8n commented 4 months ago

Perhaps the best option at this point is for me to close this PR and start fresh?

J0 commented 4 months ago

@j4w8n if you could do that it would be perfect. Feel free to tag me there - will approve ASAP.

j4w8n commented 4 months ago

Closing. Will recreate.