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

·Tech·No AI

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!

Spot something wrong?

Found a typo, a broken link, or something that could be better? I would love to hear from you. Drop me a message and I will fix it.