Bassam Ojeil

Results 86 comments of Bassam Ojeil

We don't currently support WebAuthn. Please file an [official feature request](https://firebase.google.com/support/) for it. Long term, we are definitely interested in supporting it.

You can easily implement that on your own with a couple of lines: ``` function getCurrentUser(auth) { return new Promise((resolve, reject) => { const unsubscribe = auth.onAuthStateChanged(user => { unsubscribe();...

Yes that promise will fire. `onAuthStateChanged` always triggers with the initial state even when it is null. That is what you care for here, the current state. After that is...

I have no idea what you mean by: " consistently return null if it already checking in persistence storage, or return the actual current user after that".

Please read the documentation, you presume some incorrect assumptions. If we were to implement a promise that returns the current user, it will be done as I described. `onAuthStateChanged` will...

This is the reference for `onAuthStateChanged`: https://firebase.google.com/docs/reference/js/firebase.auth.Auth#onAuthStateChanged This is the guide on how to use it: https://firebase.google.com/docs/auth/web/manage-users#get_the_currently_signed_in_user Any time you call this listener after initial state has been determined, it...

Fair enough. We should update the documentation and references to mention that. Thanks for pointing that out.

`firebase.auth().currentUser` caches the user regardless of persistence.

Please file a ticket at https://firebase.google.com/support/ You will need to provide sensitive project related information not appropriate for this public forum.

Can you also file an [official feature request](https://firebase.google.com/support) for this.