AirLabsTeam / react-native-aws-cognito-js

React Native AWS Cognito JS SDK
Other
134 stars 19 forks source link

TypeError: Cannot read property 'computeModPow' of undefined #15

Closed StephenBydawell closed 7 years ago

StephenBydawell commented 7 years ago

Hi there,

I am getting this error when trying to cognitoUser.authenticateUser with the basic Authentication example.

I am using the expo XDE and IOS simulator. I have linked the projects as shown in the instructions.

jmparsons commented 7 years ago

@StephenBydawell Expo doesn't allow you to use native plugins. It will bring in certain ones into its eco system such as icons etc. This library will only work on an ejected project that can link libraries to native bridge code.

StephenBydawell commented 7 years ago

@jmparsons Thanks, I understand now. I am now using react-native init as there are many packages I need that require native plugins. However, I was able to get Cognito working by following: https://shellmonger.com/2017/05/15/authenticating-react-native-to-aws-cognito-user-pools/ if anyone is interested. This issue can be closed, thanks for the help!

jmparsons commented 7 years ago

@StephenBydawell That article is pretty much what I did:

https://github.com/aws/amazon-cognito-identity-js/issues/340

This library integrates the SRP_A through the react native bridge to speed up compute modpow.

chinnpao commented 7 years ago

@StephenBydawell The link has been removed.

jmparsons commented 7 years ago

@StephenBydawell I fixed the url. If you're having troubles with computeModPow run react-native link and make sure you're in an ejected application.