torrens / react-native-aws-cognito-expo

A sample application to show AWS Cognito in a react-native application.
20 stars 6 forks source link

NotAuthorizedException: Incorrect username or password. #1

Open dmongit opened 7 years ago

dmongit commented 7 years ago

In auth.js, my sign in is failing b/c of authenticateUser. The attempt to sign in times out and I receive an error (subject of this issue). I added some console.logs to authenticateUser inside of CognitoUser.js

All of my logs write out quick until this line of code: this.client.makeUnauthenticatedRequest('initiateAuth', { When the call times out, the rest of my logs write out. My last log in the code is right before const respondToAuthChallenge = (challenge, challengeCallback) =>.

Basically, some code runs, hangs on makeUnauthenticatedRequest, then spits out the rest of the logs after the time out and then I get NotAuthorizedException: Incorrect username or password.

Registering works fine. I can see my user in AWS Console.

Update: This only fails on Android. Logins work fine on iOS.

Update 2: I think it's failing on BigInteger. Maybe.

Update 3: I'm using Expo and noticed that this problem only occurs when I'm not in remote debug mode. If I shake my phone and turn on remote debugging, there is no issue. So, I definitely think this is a biginteger issue with remote debugging turned off.

dmongit commented 7 years ago

According to a few deep dark places on github issues and comments, this just isn't working right on Android. Can anyone else confirm? Any workarounds?

Viper512 commented 4 years ago

I have the same issue. App works fine in dev mode, switch to production cannot login.

Did you find a resolution for this?

dmongit commented 4 years ago

I have the same issue. App works fine in dev mode, switch to production cannot login.

Did you find a resolution for this?

Kind of, yes. I use aws-amplify. I have no problems (unless your users don't have phone or email, then you have different problems).