'ERROR Error: Uncaught (in promise): FirebaseError: Firebase: Error (auth/argument-error). I already enabled my google sign in firebase. How can i fix
I'm trying to use google sign in from firebase in my ionic angular project, I follow the tutorial, the compilation was good but when i click the sign in button it gives an error.
import { Injectable } from '@angular/core';
import { AngularFireAuth } from '@angular/fire/compat/auth';
import { Router } from '@angular/router';
import { User } from 'firebase/app';
import { BehaviorSubject, Observable, Observer } from 'rxjs';
import { auth } from 'firebase/app';
import 'firebase/auth';
@Injectable({
providedIn: 'root'
})
export class LoginService {
authUser: BehaviorSubject<User> = new BehaviorSubject<User>(null);
constructor(
private auth: AngularFireAuth,
private router: Router
) { }
loginWithGoogle(): Observable<any>{
return new Observable((observer: Observer<any>) => {
this.auth.signInWithPopup(new auth.GoogleAuthProvider())
.then((response: auth.UserCredential) => {
if (response.user) {
this.authUser.next(response.user);
observer.next({});
observer.complete();
}
});
});
}
logout() {
this.auth.signOut().then(() => {
this.router.navigate(['/landing']);
});
}
getLoggedInUser() {
return this.authUser.asObservable();
}
}
the error in the console says, ERROR
ERROR Error: Uncaught (in promise): FirebaseError: Firebase: Error (auth/argument-error).

Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
