oidc-client-js icon indicating copy to clipboard operation
oidc-client-js copied to clipboard

Need to get error_description when exchanging token

Open MayGo opened this issue 4 years ago • 1 comments

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?

MayGo avatar Mar 05 '20 11:03 MayGo

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

brockallen avatar Mar 05 '20 16:03 brockallen