After attempting various methods to call the function sendEmailVerification()
, I have not been successful. Even the documentation hasn't provided much help.
Here is a snippet of the source code that I am working with. Any guidance on how to address this issue would be greatly appreciated.
When checking my console, I encountered the following error:
TypeError: Cannot read property 'emailVerified' of null at Object.firebase.auth.onAuthStateChanged.firebaseUser [as next]
btnSignUpWithGoogle.addEventListener('click', e => { var provider = new firebase.auth.GoogleAuthProvider(); firebase.auth().signInWithPopup(provider).then(function(result) { var token = result.credential.accessToken; var user = result.user; }).catch(function(error) { var errorCode = error.code; var errorMessage = error.message; var email = error.email; var credential = error.credential; console.log(errorCode); }); }); // Other event listeners and their associated functions...