The requested action is invalid - GoogleAuthProvider
Chris-Imade opened this issue · comments
This is the sample code
` const googleSignUp = (e) => {
// e.preventDefault();
const provider = new GoogleAuthProvider();
const auth = getAuth();
auth.useDeviceLanguage();
signInWithPopup(auth, provider)
.then((result) => {
// This gives you a Google Access Token. You can use it to access the Google API.
const credential = GoogleAuthProvider.credentialFromResult(result);
const token = credential.accessToken;
// The signed-in user info.
const user = result.user;
setNewUser(user);
console.log(user);
setSignUpSuccess(true);
// ...
}).catch((error) => {
// Handle Errors here.
const errorCode = error.code;
const errorMessage = error.message;
// The email of the user's account used.
const email = error.customData.email;
// The AuthCredential type that was used.
const credential = GoogleAuthProvider.credentialFromError(error);
// ...
console.log(errorMessage)
});
}
`
Initially it was issues with pop-up now pop-up works but it show the text(errors) on the pop-up "he requested action is invalid."