Closed dahudson88 closed 6 years ago
This was my bad. Did not follow the instructions here https://www.npmjs.com/package/aws-sdk#in-react-native . Using import will not work be sure to do just as the instructions state.
Yes, for now that is the way to bring in the main AWS SDK.
Hello,
I am getting a Cannot read property 'CognitoIdentityCredentials' of undefined error when trying to get the credentials. I have aws-sdk installed. Is there something else that could be causing this issue?
See Code Below:
import { AWS } from 'aws-sdk'; import { CognitoUserPool, CognitoUserAttribute, CognitoUser, AuthenticationDetails } from 'amazon-cognito-identity-js';
loginUser() { const { navigate } = this.props.navigation; var authenticationData = { Username : this.state.emailText, Password : this.state.passwordText }; var authenticationDetails = new AuthenticationDetails(authenticationData);