Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add password recoery flow support for pkce (#813)
## What kind of change does this PR introduce? Currently, `PASSWORD_RECOVERY` auth event is not emitted during a password recovery flow using pkce. ## What is the current behavior? Calling `resetPasswordForEmail()` method ## What is the new behavior? Calling `resetPasswordForEmail()` sets a code verifier and the auth flow `PASSWORD_RECOVERY` with a `/` separator on the local storage like this: `${codeVerifier}/PASSWORD_RECOVERY` Within `_exchangeCodeForSession()`, the auth flow and the code verifier is extracted from local storage, and if the auth flow is `PASSWORD_RECOVERY`, then `PASSWORD_RECOVERY` event is fired instead of `SIGNED_IN` event.
- Loading branch information