Skip to content Skip to sidebar Skip to footer

Expo: "auth/operation-not-supported-in-this-enviroment"

I develop a react-native (expo) mobile app and try to sign in with a google account to firebase, but I get an error: 'auth/operation-not-supported-in-this-enviroment. This operati

Solution 1:

signInWithPopup is not supported in react-native. You will need to use a third party OAuth library to get the OAuth ID token or access token and then sign in with Firebase:

const cred = firebase.auth.GoogleAuthProvider.credential(googleIdToken, googleAccessToken);
firebase.auth().signInWithCredential(cred)
  .then((result) => {
    // User signed in.
  })
  .catch((error) => {
    // Error occurred.
  });

Solution 2:

Firebase does not support signInWithPopup in a React Native environment.

You can view a full list of supported environments on this page.

You can also submit a feature request for extended Firebase support for React Native here.

Post a Comment for "Expo: "auth/operation-not-supported-in-this-enviroment""