// Verify if the user is currently logged in
onAuthStateChanged(async (user: any, _next: any) => {
if (user) {
console.log(user);
} else {
const result = await signInWithPopup(auth, provider);
console.log(result);
}
});
Upon running this code snippet, an error message stating
An argument for 'nextOrObserver' was not provided.
The function expected 2-4 arguments but only received 1.
. Despite appearing to have two declared arguments.
This issue with the code leads to a refusal from the TypeScript compiler to successfully compile it.