firebase / firebase/firebase-js-sdk

FR: onAuthStateChanged return UserCredential

Open
#1,018 0 comments 11 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.