Hi guys, so I was trying firebase 3.1 facebook authentication with react-native.
Since firebase doesn't support popup or redirect in react-native, i'm using react-native-fbsdk to get the access token but when I'm trying to use auth.signInWithCredential, the sign in fail on
code: "auth/app-not-authorized",
message: "This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console."
This is my code. any help would be very much appreciated.
import { LoginManager, AccessToken} from 'react-native-fbsdk';
import firebase from '../Services/firebase'; const auth = firebase.auth();const provider = firebase.auth.FacebookAuthProvider;LoginManager.logInWithReadPermissions(['public_profile']).then(loginResult => { if (loginResult.isCancelled) { console.log('user canceled');
return;
}
AccessToken.getCurrentAccessToken()
.then(accessTokenData => { const credential = provider.credential(accessTokenData.accessToken); return auth.signInWithCredential(credential); }) .then(credData => { console.log(credData); }) .catch(err => { console.log(err); });});
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/bc746d0c-9479-49b2-9290-dd49bd7cdc9c%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.