'Property 'GoogleAuthProvider' does not exist on type 'Auth'.ts(2339)
In my auth.service.ts, when I add sign in with google, it gave me an error saying that Property 'GoogleAuthProvider' does not exist on type 'Auth'. ts(2339).
This is the code written in auth.service.ts:
import { Injectable } from '@angular/core';
import { first } from 'rxjs/operators';
import { Auth } from '@angular/fire/auth';
@Injectable({
providedIn: 'root'
})
export class AuthService {
constructor(private afAuth: Auth) { }
googleSignIn() {
const provider = new this.afAuth.GoogleAuthProvider();
return this.oAuthLogin(provider);
}
async getUser() {
return this.afAuth.authState.pipe(first()).toPromise();
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
