Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.

Need to get error_description when exchanging token #1069

Open
MayGo opened this issue Mar 5, 2020 · 1 comment
Open

Need to get error_description when exchanging token #1069

MayGo opened this issue Mar 5, 2020 · 1 comment

Comments

@MayGo
Copy link

MayGo commented Mar 5, 2020

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?

@brockallen
Copy link
Contributor

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

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

No branches or pull requests

2 participants