Using Federated Login/ Cognito with react-native
See original GitHub issue** Which Category is your question related to? ** Auth ** What AWS Services are you utilizing? ** Amplify +Cognito User Pools + federated identity + facebook login ** Provide additional details e.g. code snippets **
First of all Great lib thanks!.
I’m failing to get facebook login working using amplify with react-native. I’m not sure exactly how the callback to the native mobile app works. I’m pretty sure my issue lies somewhere in callback configuration. My react native app calls out using to facebook using:
Auth.federatedSignIn({ provider: "Facebook" })
Facebook requests the permissions then and after the I confirm it calls out to :
https://MYAPPBUNDLEID:/authorize
I have set that value to the callback URL in my cognito app client settings to https://MYAPPBUNDLEID:/authorize
So my questions are:
- What value should the value for
redirectSignIn
in aws-exports be when using react-native? (is https://com.bundleid:/authrorize correct?) - What value should I use for callback URLs in cognito’s “App Client Settings” when using working with react-native? (is https://com.bundleid:/authrorize correct?)
- Do I need to handle the callback manually with iOS openurl API or do one of the AWS SDKs handle that for us? not clear in the docs?
Issue Analytics
- State:
- Created 4 years ago
- Comments:29 (1 by maintainers)
Top GitHub Comments
@waltermvp ah, in that case, I do have that setup correctly "/. This is my current scenario:
signIn with facebook button -> navigated to facebook auth page -> navigated back into app
.This flow seems correct. The only issue is that I do not have access to the data returned (tokens etc…). The Hub.listen() does not get triggered with this scenario.
@chriscraiclabs I did. For me the issue was that i was using the incorrect redirectURI. Have you setup your android/ios app to handle the url linking call?
basic hub listening: