{"action":"created","issue":{"url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/3410","repository_url":"https://api.github.com/repos/aws-amplify/amplify-js","labels_url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/3410/labels{/name}","comments_url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/3410/comments","events_url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/3410/events","html_url":"https://github.com/aws-amplify/amplify-js/issues/3410","id":453077212,"node_id":"MDU6SXNzdWU0NTMwNzcyMTI=","number":3410,"title":"withOAuth + facebookSignIn confusing permission request / new users not signed to facebook","user":{"login":"mkrn","id":1870075,"node_id":"MDQ6VXNlcjE4NzAwNzU=","avatar_url":"https://avatars2.githubusercontent.com/u/1870075?v=4","gravatar_id":"","url":"https://api.github.com/users/mkrn","html_url":"https://github.com/mkrn","followers_url":"https://api.github.com/users/mkrn/followers","following_url":"https://api.github.com/users/mkrn/following{/other_user}","gists_url":"https://api.github.com/users/mkrn/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrn/subscriptions","organizations_url":"https://api.github.com/users/mkrn/orgs","repos_url":"https://api.github.com/users/mkrn/repos","events_url":"https://api.github.com/users/mkrn/events{/privacy}","received_events_url":"https://api.github.com/users/mkrn/received_events","type":"User","site_admin":false},"labels":[{"id":845261099,"node_id":"MDU6TGFiZWw4NDUyNjEwOTk=","url":"https://api.github.com/repos/aws-amplify/amplify-js/labels/Auth","name":"Auth","color":"d334bb","default":false},{"id":1017484567,"node_id":"MDU6TGFiZWwxMDE3NDg0NTY3","url":"https://api.github.com/repos/aws-amplify/amplify-js/labels/React%20Native","name":"React Native","color":"c1223d","default":false},{"id":1299358781,"node_id":"MDU6TGFiZWwxMjk5MzU4Nzgx","url":"https://api.github.com/repos/aws-amplify/amplify-js/labels/to-be-triaged","name":"to-be-triaged","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-06-06T14:53:45Z","updated_at":"2019-06-21T03:41:15Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\n1. Using withOAuth HOC and facebookSignIn flow in expo bare / react native shows alert that says \"AppName Wants to Use \"amazoncognito.com\" to Sign In\" \r\nThe users may not be familiar with amazoncognito.com and may be confused since they chose to sign in with Facebook, not Amazon.\r\n\r\n2. 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.\r\n\r\nIs there any way to have permission say \"use 'facebook.com'\" to sign in?\r\nIs there any way to have new users signed in if they've signed in to the Facebook app on their phone?\r\n\r\nI'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.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Click a button with onPress action this.props.facebookSignIn\r\n\r\n**Expected behavior**\r\n- Alert asking if user would like to sign in with \"facebook.com\"\r\n- Following screen have user signed in to facebook.\r\n\r\n**Screenshots**\r\nIf applicable, add screenshots to help explain your problem.\r\n\r\n**Smartphone (please complete the following information):**\r\n - iPhone 8 plus\r\n- iOS 12.2\r\n - react-native 0.59.5 \r\n- aws-amplify 1.1.26 \r\n- \"aws-amplify-react-native\": \"2.1.10\",\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n\r\n**Sample code**\r\n```\r\n\r\nconst urlOpener = async (url, redirectUrl) => {\r\n  const { type, url: newUrl } = await WebBrowser.openAuthSessionAsync(url, redirectUrl);\r\n\r\n  if (type === 'success') {\r\n    await WebBrowser.dismissBrowser();\r\n\r\n    if (Platform.OS === 'ios') {\r\n      return Linking.openURL(newUrl);\r\n    }\r\n  }\r\n};\r\n\r\nAmplify.configure({\r\nAuth: {\r\n...\r\noauth: {\r\n      domain: Config.REACT_APP_COGNITO_DOMAIN,\r\n      scope: ['public_profile', 'email'],\r\n      redirectSignIn: `app://signIn`, \r\n      redirectSignOut: `app://signOut`,\r\n      responseType: 'code',\r\n      urlOpener,\r\n    }\r\n```\r\n\r\n\r\n***You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.***\r\n"},"comment":{"url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/comments/504277428","html_url":"https://github.com/aws-amplify/amplify-js/issues/3410#issuecomment-504277428","issue_url":"https://api.github.com/repos/aws-amplify/amplify-js/issues/3410","id":504277428,"node_id":"MDEyOklzc3VlQ29tbWVudDUwNDI3NzQyOA==","user":{"login":"loganwedwards","id":2034000,"node_id":"MDQ6VXNlcjIwMzQwMDA=","avatar_url":"https://avatars1.githubusercontent.com/u/2034000?v=4","gravatar_id":"","url":"https://api.github.com/users/loganwedwards","html_url":"https://github.com/loganwedwards","followers_url":"https://api.github.com/users/loganwedwards/followers","following_url":"https://api.github.com/users/loganwedwards/following{/other_user}","gists_url":"https://api.github.com/users/loganwedwards/gists{/gist_id}","starred_url":"https://api.github.com/users/loganwedwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loganwedwards/subscriptions","organizations_url":"https://api.github.com/users/loganwedwards/orgs","repos_url":"https://api.github.com/users/loganwedwards/repos","events_url":"https://api.github.com/users/loganwedwards/events{/privacy}","received_events_url":"https://api.github.com/users/loganwedwards/received_events","type":"User","site_admin":false},"created_at":"2019-06-21T03:41:15Z","updated_at":"2019-06-21T03:41:15Z","author_association":"NONE","body":"@mkrn I do not think the flow you are describing is possible. There's a statement buried in the docs indicating that RN apps must use the hosted Cognito UI (which you can hide), but the initial web browser redirect does go there before Facebook. The popup is an Expo thing indicating an oauth flow via a web redirect is about to happen. https://docs.expo.io/versions/v30.0.0/sdk/auth-session/\r\n\r\nOne small idea for an improvement would be to associate a custom domain with Cognito in the AWS Console, so at least the user associates the auth flow with an existing app experience."}}
{"actor":{"display_login":"loganwedwards"}}