AWS CognitoIdentity NotAuthorizedException: Incorrect username or password

Hi,
After successful user registration, trying to Sign Up, but receive:
NotAuthorizedException: Incorrect username or password

Debug shows that all AWS Cognito ‘challenge’ steps seem to be successful, except last: CognitoIDPClient.RespondToAuthChallengeAsync

I attach the used script (credits to: AWS Cognito User Account Signup And Login with Unity — gradientspace).

Please tell me, what could be the reason - is it a Unity or AWS issue, or maybe sth is wrong in the script?

8447531–1120304–CognitoAuth.cs (7.36 KB)

Hello!

Apologies for the delayed response, it seems like this is a setup issue in the script using the AWS SDK.

It looks like the authRequest in the TrySignInRequest function is missing the “Password” key value pair. You may also need to change the AuthFlowType to AuthFlowType.USER_PASSWORD_AUTH based on the setup.

Hope that helps!