I am trying to connect my Expo Facebook Login app to my Firebase profile. I managed to get Facebook login working, moreover added the config to Firebase and enabled the OAuth URL redirect.
However…
When I try to SignInWithCredentials with my token from FacebookAuthProvider, my app says that the credentials I try to log in is incorrect. I that function is checking if username and password is correct, right? Do I have to use another method?
const facebook_login = async() => {
try {
await Facebook.initializeAsync({
appId: FBAPPID,
});
const { type, token, expirationDate, permissions, declinedPermissions } =
await Facebook.logInWithReadPermissionsAsync({
permissions: ['public_profile', 'email'],
});
if (type === 'success') {
const credential = FacebookAuthProvider.credential(token)
//ERROR HERE, GIVING USERNAME PW WRONG DIALOG
const {result} = await signInWithCredentials(credential)
} else {
// type === 'cancel'
}
} catch ({ message }) {
Alert.alert(`Hiba a Facebook bejelentkezés közben: ${message}`);
}
}