-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
🐛 Bug Report
Environment
Expo CLI 3.2.3 environment info:
System:
OS: macOS 10.14.5
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.16.0 - ~/.nodebrew/current/bin/node
Yarn: 1.16.0 - ~/.nodebrew/current/bin/yarn
npm: 6.4.1 - ~/.nodebrew/current/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
expo: ^35.0.0 => 35.0.0
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8
react-navigation: ^3.11.0 => 3.11.0
npmGlobalPackages:
expo-cli: 3.2.3
iOS Standalone AND iOS Expo Client
Steps to Reproduce
Must be logged out of Facebook in the browser, but logged in in the Facebook app
Facebook.logInWithReadPermissionsAsync, doesn’t come back to our app after flying to Facebook app.
This may or may not occur.
For now it only occurs on iOS standalone.
It’s pretty strange because it’s quite strange behavior and it hurts user acquisition opportunities.
This is fatal for our app.
Expected Behavior
After logging in with Facebook, you are redirected to our app and the login process is executed
Actual Behavior
Even after logging in on the Facebook app, it behaves like staying in the Facebook app.
The only way to get back to our app is to cancel, and of course the login process will fail.
Sample code
import * as firebase from 'firebase';
import * as Facebook from 'expo-facebook';
const signinFacebook = async () => {
try {
const {
type,
token,
} = await Facebook.logInWithReadPermissionsAsync(
ENV.FACEBOOK_APP_ID,
{
permissions: ['public_profile', 'email'],
},
);
if (type === 'success') {
const credential = firebase.auth.FacebookAuthProvider.credential(token);
return firebase.auth().signInWithCredential(credential).catch((error) => {
throw error;
});
}
} catch (error) {
// ERROR
}
};
grigored, nsdub, adriaanbalt, TomasPlachy, sungsong88 and 4 morenachofassini, adriaanbalt and LuisRodriguezLDEndreElv, adriaanbalt, akramimtiaz and LuisRodriguezLD