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

AuthenticationResponse.getErrors() Doesn't Always Return a Meaningful Error Message #500

Open
emanor-okta opened this issue Aug 14, 2024 · 1 comment
Assignees

Comments

@emanor-okta
Copy link

Testing with Latest okta-idx-java 3.0.7

Using the below code,

AuthenticationResponse beginResponse = idxAuthenticationWrapper.begin(new RequestContext());
for (String error: beginResponse.getErrors()) {
      System.out.println("Error: " + error);
}

If an invalid client_id is provided to the SDK the following is logged,

Error: null:null

The raw message returned from Okta,

{
   "errorCode": "invalid_client",
   "errorSummary": "Invalid value for 'client_id' parameter.",
   "errorLink": "invalid_client",
   "errorId": "oaeS1WCm9sfRZiWy4NwK2z-bg",
   "errorCauses": []
}

If instead the scope openid is left out of the above request, then the following is logged,

Error: invalid_scope:Requests for ID tokens or access tokens with OpenID scopes require the 'openid' scope.

The raw message returned from Okta,

{
   "error": "invalid_scope",
   "error_description": "Requests for ID tokens or access tokens with OpenID scopes require the 'openid' scope."
}
@arvindkrishnakumar-okta
Copy link
Contributor

@emanor-okta Thanks for posting! This may have already been fixed with the latest code in master. Can you please try with the latest code from master? I'll cut a release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants