// Check if user is logged in
onAuthStateChanged(async (user: any, _next: any) => {
if (user) {
console.log(user);
} else {
const result = await signInWithPopup(auth, provider);
console.log(result);
}
});
This code gives the error An argument for 'nextOrObserver' was not provided. Expected 2-4 arguments, but got 1.. But from what I can tell the function has two arguments.
This causes the typescipt compiler to refuse to compile.