Oidc-client-js: Need to get error_description when exchanging token

Created on 5 Mar 2020  路  1Comment  路  Source: IdentityModel/oidc-client-js

When an application is exchanging token with the query /openid/token and it fails with HTTP status 400, then it needs to give more information regarding the reason.

And this is given in the response as error_description field.
eg:

{ "error_description": "Token has been revoked.", "error": "invalid_grant" }

Can changes be made, so line https://github.com/IdentityModel/oidc-client-js/blob/fd838832aaacdaf1b8bd213c8e3787150f33af4d/src/JsonService.js#L161 would also return error_description?

enhancement question

Most helpful comment

I guess we'd add it as a custom property on the Error?

>All comments

I guess we'd add it as a custom property on the Error?

Was this page helpful?
0 / 5 - 0 ratings