firebase / firebase/firebase-js-sdk
FR: onAuthStateChanged return UserCredential
Open
api: auth
feature request
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### [REQUIRED] Describe your environment
* Firebase SDK version: 5.2.0
* Firebase Product: auth
### [REQUIRED] Describe the problem
It would be really helpful if `onAuthStateChanged` also returned a `UserCredential` object together with `AdditionalUserInfo`. I currently use `onAuthStateChanged` to manage login events and it would be great if I could determine whether it's a new user or not and redirect him to the proper page.
Contributor guide
Assessment
This issue has not been assessed yet.