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

Potential loss of information when failing to get a token #140

Open
paul-hicks-mahana opened this issue Jun 10, 2024 · 2 comments
Open

Potential loss of information when failing to get a token #140

paul-hicks-mahana opened this issue Jun 10, 2024 · 2 comments

Comments

@paul-hicks-mahana
Copy link

I've come across a response from a request('tokenEndpoint') which includes a property in the response body that OAuth2Client is ignoring. I've checked the RFC, and there's no "MUST NOT" or similar forbidding extra properties. And at least for this OAuth server, the ignored property would have been very useful to see earlier!

{
  error: "invalid_request",
  error_description: "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",
  hint: "Authorization code has expired",
  message: "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",
}

I'd like to request that the responseBody be included in the thrown OAuth2Error at the end of request(), so that non-standard properties like hint can be found by developers.

@evert
Copy link
Collaborator

evert commented Jun 10, 2024

worth looking into. Got any information about what is producing this?

@paul-hicks-mahana
Copy link
Author

In my case, it was the API at oauth.workflowmax2.com/oauth/.
A quick search has found that "hint" header elsewhere:

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