Closed
Description
Version info
Angular: 4.1.3
Firebase: 4.1.3
AngularFire: 4.0.0-rc.1
afAuth.idToken
and afAuth.authState
seem to be duplicates of each other, both having the type Observable<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:
// idToken: Observable<string>;
// note: can't use Observable.fromPromise because firebase.Promise can't be cast to Promise
this.idToken = this.afAuth.idToken.mergeMap((user) => {
return Observable.from(user.getIdToken());
});
I am quite happy to submit a PR to alter .idToken
to be Observable<string>
. Please let me know of I should go ahead.
Metadata
Metadata
Assignees
Labels
No labels