-
Notifications
You must be signed in to change notification settings - Fork 938
Issue #462 fix : Add new method that returns the logged-in user as Promise : #4288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Hi @harshshredding, thank you very much for this pull request! API changes of this nature go through an internal process for approval. I'm sponsoring this and will get back to you in a few weeks! |
Hi @harshshredding, thanks so much for your patience. After an internal review, we've concluded that this function should not itself return a user object. Instead, the function should return a That function should be called interface Auth {
authStateReady(): Promise<void>;
} The function could then be used like: async function doStuff() {
await firebase.auth().authStateReady();
nowSafeToRead(firebase.auth().currentUser);
} I believe your function in this PR can be easily updated to do the same thing but simply not resolve with any value. |
@sam-gc I will update the PR very soon. Thanks a lot for the feedback. |
wow |
??? |
Sorry guys, I don't have the bandwidth. @sam-gc can you assign this to someone else? |
We got API review feedback to expose this slightly differently. We are working on it in #7384 |
Issue #462
Hi, firebase team! I am sure this pull-request is far from complete since I lack an understanding of the codebase.
onAuthStateChanged
has the following caveats that seem to be making it difficult for new-comers to get started withfirebase-auth
:async
keyword.I was asked to tag @avolkovi and @bojeil-google.