stackblitz / core

Online IDE powered by Visual Studio Code ⚡️
https://stackblitz.com
MIT License
10.23k stars 887 forks source link

@angular/fire is not installed properly #2859

Open ayyash opened 9 months ago

ayyash commented 9 months ago

I am trying to use @angular/fire/auth in StackBlitz but it does not check, for example: GoogleAuthProvider and this.auth.currentUser in the following code

const provider = new this.auth.GoogleAuthProvider();
this.auth.currentUser.getIdToken(true);

and the User interface cannot be found. Why is this? am I doing something wrong?

Using Angular 16.2 seed, with firebase@10.5.2 and @angular/fire@16.0.0

github-actions[bot] commented 7 months ago

In order to investigate further we need a link to a StackBlitz project reproducing the issue. /n /n As this issue has been inactive for 1 day without a reproduction link, it will be closed to allow prioritization of other issues. /n /n If this needs additional investigation, please share a reproduction link by opening a new issue. Thanks for your diligence in helping us continuously improve the StackBlitz platform.

ayyash commented 7 months ago

Sure, here is a stackblitz quicky, notice the red squiggles under "currentUser"
https://stackblitz.com/edit/stackblitz-starters-bpvdbg?description=An%20angular-cli%20project%20based%20on%20@angular/animations,%20@angular/common,%20@angular/compiler,%20@angular/core,%20@angular/forms,%20@angular/platform-browser,%20@angular/platform-browser-dynamic,%20@angular/router,%20core-js,%20rxjs,%20tslib%20and%20zone.js&file=src%2Fauth.ts&title=Angular%20Starter

import { Auth } from '@angular/fire/auth';

class authe {
  constructor(private auth: Auth) {}
  something() {
    this.auth.currentUser;
  }
}
HeyGarrison commented 7 months ago

Thank you for the link!