Reputation: 79
I'm trying to set up User Sign-in with AWS Cognito on React Native. I've followed these instructions: http://docs.aws.amazon.com/aws-mobile/latest/developerguide/react-native-add-user-sign-in.html
I'm able to post analytics about the app and see a chart with data on AWS Pinpoint, but Cognito does not seem to be working
Things I've tried:
redownloading aws-exports.js
awsmobile pull
Upvotes: 1
Views: 1543
Reputation: 79
I figured it out. You have to configure Amplify before calling withAuthenticator(App). I just put it up at the top with the imports. It would have been nice if the tutorial mentioned this...
import Amplify from 'aws-amplify-react-native';
import aws_exports from './aws-exports';
import { withAuthenticator, API } from 'aws-amplify-react-native';
Amplify.configure(aws_exports);
Upvotes: 5