dappsnation / akita-ng-fire

Akita ❤️ Angular 🔥 Firebase
MIT License
131 stars 27 forks source link

isNewUser property is unreliable when creating user in Firebase Console #79

Closed DavMig closed 3 years ago

DavMig commented 4 years ago

Hello,

When you create a brand new user in the firebase console (native login/password auth from firebase) and then you signin with that user, the profile is never created on the firebase collection.

The reason is that the property isNewUser is set to false even if the user has never logged in. As a result the check here does not pass and profile is never created on firebase.

So far I've seen this behaviour only for the native firebase auth (Microsoft auth just works fine).

I've bypassed this by making a call directly to firebase to check if profile document exists. A solution that may work is to let the developer define a callback function to check if the profile should be created.

Thanks.

fritzschoff commented 4 years ago

Hey, checkout v2.0.3, you should have more context now!