Skip to content

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

@emanor-okta

Description

@emanor-okta

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."
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions