prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 556 forks source link

Firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated #934

Open JonnyBoy333 opened 4 years ago

JonnyBoy333 commented 4 years ago

Getting this warning when calling firebase.login({ credential }) passing in credentials from facebook provider. This is in a react native environment using expo. Here is my code:

await Facebook.initializeAsync('xxxx', 'Cool App');
const loginResult = await Facebook.logInWithReadPermissionsAsync({ permissions: ['public_profile', 'email', 'user_friends'] });
if (loginResult.type === 'success') {
  const credential = firebase.auth.FacebookAuthProvider.credential(loginResult.token);
  await firebase.login({ credential });
} else {
  Alert.alert('Facebook Sign In Cancelled');
}

I have react-redux-firebase v3.4.0 installed and firebase v7.9.0 installed.

The full error is: firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead.

I'm guessing something needs to be updated to accommodate firebase's new APIs.

ceafive commented 3 years ago

Hello @prescottprue any update on this? I am also getting this depreciation error.

sharpvisions commented 2 years ago

Hi @prescottprue, I am also having this problem, can you please guide us how did you solve the issue?