When attempting to sign in with Google using 'AngularFireAuth', I encountered an error. Here is the code snippet from my auth.service.ts file:
import { Injectable } from '@angular/core';
import { first } from 'rxjs/operators';
import { AngularFireAuth } from '@angular/fire/compat/auth';
@Injectable({
providedIn: 'root'
})
export class AuthService {
constructor(public afauth: AngularFireAuth) { }
googleSignIn() {
const provider = new this.afauth.GoogleAuthProvider();
return this.oAuthLogin(provider);
}
async getUser() {
return this.afauth.authState.pipe(first()).toPromise();
}
}