-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Bug: afAuth.idToken returns firebase.User instead of idToken #1069
Comments
Behaving as expected, though the naming is odd, it reflects the JS SDK. As of 4.0 onAuthStateChanged is now only triggered on sign-in and out, |
@davideast what do you think? |
Yeah, on second thought I think I agree |
Well my 2c is that the JS SDK is pretty weird/unintuitive in that aspect; might not wanna model that weirdness in AF2. |
Btw @craigsnyders , this is a shorter equivalent version of your code:
|
Version info
Angular: 4.1.3
Firebase: 4.1.3
AngularFire: 4.0.0-rc.1
afAuth.idToken
andafAuth.authState
seem to be duplicates of each other, both having the typeObservable<firebase.User>
and identical implementations. I understand this may be fallout from v4.0.0 but I can't see any reason why.idToken
shouldn't return the actual token.My workaround is as follows:
I am quite happy to submit a PR to alter
.idToken
to beObservable<string>
. Please let me know of I should go ahead.The text was updated successfully, but these errors were encountered: