Token_type field not present in response

I have been working on a project to implement login with twitch on my site, which is built with Spring, and I found that the token response doesn’t have token_type field:

According to the ietf specification, the token_type is a required field:

REQUIRED. A case-insensitive value specifying the method of using
of the access token issued, as specified in Section 7.1 of
[RFC6749]. It provides the client with information about how to
utilize the access token to access protected resources. For
example, a value of “Bearer”, as specified in [RFC6750], indicates
that the security token is a bearer token and the client can
simply present it as is without any additional proof of
eligibility beyond the contents of the token itself. Note that
the meaning of this parameter is different from the meaning of the
“issued_token_type” parameter, which declares the representation
of the issued security token; the term “token type” is typically
used with this meaning, as it is in all “*_token_type” parameters
in this specification. If the issued token is not an access token
or usable as an access token, then the “token_type” value “N_A” is
used to indicate that an OAuth 2.0 “token_type” identifier is not
applicable in that context.

In order to fix the issue, I have to intercept the json response and add token_type to it before we parse the json. Is it possible to have this field in the response?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.