PROGRAMMING

AWS Amplify + React Native - TypeError: Cannot read property 'computeModPow' of undefined

Recently, I’ve started learning React Native with AWS Amplify. I wanted to log in a user which is very simple, just a single function:

Auth.signIn(email, password)

Even the simplest things do not have to work right away ;-) I got an error:

TypeError: Cannot read property ‘computeModPow’ of undefined

After some debugging it turned out that I forgot about two things:

  1. Link Cognito library: react-native link amazon-cognito-identity-js
  2. Update pods: cd ios ; pod update (it installs RNAWSCognito pod)

Now it works!