-
Notifications
You must be signed in to change notification settings - Fork 791
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
CognitoIdentityProviderClient.adminInitiateAuth is consistently failing. What is missing? #5134
Comments
Hi @ipsi-apant, I am unable to reproduce the issue. Using the code sample you provided. I do get the access token successfully. Can you please check if the You can respond to the challenge using Let me know if this helps. Regards, |
It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it. |
The user confirmation status is already |
Marking to auto-close soon. Let us know if you have more info. |
The user pool was misconfigured I think. Deleting and recreating worked for me. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
I have created a Cognito user pool. Added two app clients. One having secret another without secret. Also, added a user to the pool. The documents I am referring mentioned in the
Additional Information/Context
Use case
We are planning to integrate Cognito for backend app as auth mechanism. The request contains username/password (due to backward compatibility for legacy systems). Based on the username/password we need to generate an access token using Cognito APIs.
Behavior
In the following code sample
listUsers
function is working. However, call toadminInitiateAuth
always returnnull
response.Error
java.lang.NullPointerException: Cannot invoke "software.amazon.awssdk.services.cognitoidentityprovider.model.AuthenticationResultType.accessToken()" because the return value of "software.amazon.awssdk.services.cognitoidentityprovider.model.AdminInitiateAuthResponse.authenticationResult()" is null
Code sample
Expected Behavior
As per AWS Cognito document, it should return a response having an access token. Not sure what is missing?
AdminInitiateAuthResponse adminFlowResponse = cognitoClient.adminInitiateAuth(authRequest);
Current Behavior
Following invocation always return null response
AdminInitiateAuthResponse adminFlowResponse = cognitoClient.adminInitiateAuth(authRequest);
Reproduction Steps
ADMIN_USER_PASSWORD_AUTH
typePossible Solution
Not sure but need some advise on what is missing, although the code is based on documentation.
Additional Information/Context
Referring these documents:
AWS Java SDK version used
2.24.1
JDK version used
21
Operating System and version
ubuntu2204-2023-07-25
The text was updated successfully, but these errors were encountered: