Description
Describe the bug
-
Using withOAuth HOC and facebookSignIn flow in expo bare / react native shows alert that says "AppName Wants to Use "amazoncognito.com" to Sign In"
The users may not be familiar with amazoncognito.com and may be confused since they chose to sign in with Facebook, not Amazon. -
New users need to sign in to facebook even if they're signed in to Facebook App on their iPhone. This lowers conversions since users have to enter email/password that they may not remember.
Is there any way to have permission say "use 'facebook.com'" to sign in?
Is there any way to have new users signed in if they've signed in to the Facebook app on their phone?
I'm using expo bare and already have Facebook SDK Pod, so if there's a native way to achieve Cognito+Facebook sign in please share.
To Reproduce
Steps to reproduce the behavior:
- Click a button with onPress action this.props.facebookSignIn
Expected behavior
- Alert asking if user would like to sign in with "facebook.com"
- Following screen have user signed in to facebook.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
- iPhone 8 plus
- iOS 12.2
- react-native 0.59.5
- aws-amplify 1.1.26
- "aws-amplify-react-native": "2.1.10",
Additional context
Add any other context about the problem here.
Sample code
const urlOpener = async (url, redirectUrl) => {
const { type, url: newUrl } = await WebBrowser.openAuthSessionAsync(url, redirectUrl);
if (type === 'success') {
await WebBrowser.dismissBrowser();
if (Platform.OS === 'ios') {
return Linking.openURL(newUrl);
}
}
};
Amplify.configure({
Auth: {
...
oauth: {
domain: Config.REACT_APP_COGNITO_DOMAIN,
scope: ['public_profile', 'email'],
redirectSignIn: `app://signIn`,
redirectSignOut: `app://signOut`,
responseType: 'code',
urlOpener,
}
You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.