ultimatecourses / angular-pro-app-seed

Seed project for Angular Pro final application
112 stars 360 forks source link

Retrieving currentUser and uid #41

Open ichigo92 opened 2 years ago

ichigo92 commented 2 years ago

Hi @toddmotto,

Thanks for a wonderful course, appreciate your effort. I am trying to follow along in the course and I am at Step 9: MealsService, Reactive Store and Firebase Observables using Angular v11, Firebase v8, Angular Fire v6.1.5 unfortunately this.af.auth.currentUser is not available. The way I can get the current user is via this.af.user but it returns an Observable<firebase.User>.

What do you suggest, should I create a property user in the AuthService and update it using do/tap on authState change or do you have something else in mind?