Chris-Imade / Important-Catlog

Needed to delete all contradicting duplicates in order to retain this. This version of catlog is by far the most important.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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."