supabase / auth-js

An isomorphic Javascript library for Supabase Auth.
MIT License
321 stars 152 forks source link

fix: Emit password recovery event from verifyOtp when otp type is recovery #829

Closed dshukertjr closed 6 months ago

dshukertjr commented 6 months ago

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Currently when the user goes through the password recovery flow via OTP and calls the verifyOtp() method, the SIGNED_IN auth event is emitted instead of PASSWORD_RECOVERY event.

What is the new behavior?

When the user goes through the password recovery flow using email OTP, the PASSWORD_RECOVERY event is emitted.

Additional context

A Flutter SDK user reported this, and thought it probably makes sense to bring it to the JS client as well. https://github.com/supabase/supabase-flutter/pull/774

github-actions[bot] commented 6 months ago

:tada: This PR is included in version 2.62.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: