Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication failed due to an internal error for challenge "PASSWORD_VERIFIER" #583

Closed
sagardvora opened this issue Nov 20, 2018 · 7 comments
Assignees
Labels
bug Something isn't working cognito Issues with the AWS Android SDK for Cognito pending-community-response Issue is pending response from the issue requestor

Comments

@sagardvora
Copy link

Describe the bug
I am implementing aws cognito user pool using custom auth for multi factor authentication.
I have set the authentication type as CUSTOM_AUTH and custom challenge as SRP_A. which in response gives another challenge as PASSWORD_VERIFIER and the procedure fails.

To Reproduce
Steps to reproduce the behavior:
Code for authentication using CUSTOM_AUTH

Map<String, String> authParameters = new HashMap<>();
        authParameters.put(CognitoServiceConstants.AUTH_PARAM_USERNAME, this.username);
        authParameters.put(CognitoServiceConstants.AUTH_PARAM_PASSWORD, password);
        authParameters.put(CognitoServiceConstants.AUTH_PARAM_SRP_A, new AuthenticationHelper(this.username).getA().toString(16));

        AuthenticationDetails authenticationDetails = new AuthenticationDetails(this.username, authParameters, null);
        authenticationDetails.setAuthenticationType(CognitoServiceConstants.AUTH_TYPE_INIT_CUSTOM_AUTH);
        authenticationDetails.setCustomChallenge(CognitoServiceConstants.AUTH_PARAM_SRP_A);
        continuation.setAuthenticationDetails(authenticationDetails);

        continuation.continueTask();

which gives callback in

  AuthenticationHandler authenticationHandler = new AuthenticationHandler() {
       @Override
        public void onFailure(Exception e) {
         .... //exception message ->  Authentication failed due to an internal error
        }
}

Which AWS service(s) are affected?
Cognito User Pool Authentication MFA

Environment(please complete the following information):

  • SDK Version: [e.g. 2.8.+]

Additional context
MFA is activated on backend server.

@mutablealligator mutablealligator added the cognito Issues with the AWS Android SDK for Cognito label Nov 20, 2018
@YoanGJ
Copy link

YoanGJ commented Nov 30, 2018

I got the same error when I try to sign in a user with cognitoUser.getSessionInBackground(authenticationHandler)

I saw that this problem was encounter when we try to sign in a user just after verifying him but it's not my case, I closed the app after the verification via signup.

@frankmuellr frankmuellr added the bug Something isn't working label Dec 3, 2018
@minbi minbi added the pending-community-response Issue is pending response from the issue requestor label Jan 25, 2019
@minbi
Copy link
Contributor

minbi commented Jan 29, 2019

@sagardvora , I saw that you commented saying that the bug fix did not solve your issue. Can you provide logs of the issue when it occurs? Also since this is a custom auth challenge. Can you give details on what the challenges are and what order is expected?

@minbi minbi closed this as completed in 93e0551 Jan 31, 2019
@minbi minbi reopened this Jan 31, 2019
@minbi
Copy link
Contributor

minbi commented Jan 31, 2019

Partial fix has been committed.

@minbi minbi added pending-release Code has been merged but pending release and removed pending-community-response Issue is pending response from the issue requestor labels Feb 7, 2019
@minbi
Copy link
Contributor

minbi commented Feb 12, 2019

Hi @sagardvora @YoanGJ ,

We have released a fix in version 2.12.0 of the SDK. Please see if this addresses the issue for you.

@minbi minbi added pending-community-response Issue is pending response from the issue requestor and removed pending-release Code has been merged but pending release labels Feb 12, 2019
@minbi
Copy link
Contributor

minbi commented Feb 18, 2019

Hi,

We are closing this issue because there has been no activity. Please feel free to open a new issue if the problem persists. We ask this because closed issues are not actively monitored.

Thanks

@vishnumulik
Copy link

vishnumulik commented Apr 5, 2019

Hi @minbi I am getting this exception "Failed to find password in authentication details to response to PASSWORD_VERIFIER challenge". i am using 2.12.0

I have added a new issue #872

@minbi
Copy link
Contributor

minbi commented Apr 5, 2019

@vishnumulik , Please use SDK version 2.12.5 or above for a fix to that issue.

awsmobilesdk pushed a commit to awsmobilesdk/aws-sdk-android that referenced this issue Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cognito Issues with the AWS Android SDK for Cognito pending-community-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

6 participants