Reputation: 21865
I've created a Firebase account and connected it with my React code :
I filled all the fields that you can see in the picture above , however when I try to login from my React screen :
When I use it in my React code :
import firebase from "firebase/app";
import "firebase/firestore";
import "firebase/auth";
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "xxxxxxxxxxxx",
authDomain: "xxxxxxxxxxxx.firebaseapp.com",
databaseURL: "https://xxxxxxxxxxxx.firebaseio.com",
projectId: "xxxxxxxxxxx-1e2be",
storageBucket: "",
messagingSenderId: "xxxxxxxxxxxxxxxxx",
appId: "xxxxxxxxxxxxxxxxxx"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
export const auth = firebase.auth();
export const firestore = firebase.firestore();
const provider = new firebase.auth.GoogleAuthProvider();
provider.setCustomParameters({ prompt: 'select_account' });
export const signInWithGoogle = () => auth.signInWithPopup(provider);
export default firebase;
And run it , I get :
What might be the problem ? looks like I have all the permissions in tact.
So where did I go wrong ?
EDIT : Sign in method is enabled and still doesn't work!
Upvotes: 0
Views: 849
Reputation: 157
I had the same issue right now. You did right when you enabled "Google" in the "Sign-In Method" but you probably didn't see the grey panel where you need to input the "Project support email".
Disable, click "Save" and then Enable Again. Afterwards you'll see the grey panel and enter your Google account. And then...the rest is history.
Goodluck Champ!
Upvotes: 2
Reputation: 984
You have to enable it in Firebase console => Authentication tab => Sign-in method
Upvotes: 0