How to handle possibly non-conforming token_type
?
#185
Unanswered
abhijit-hota
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I have prototyped a WIP branch for
Not necessarily because I want to acknowledge and support slacks' non-conforming and entirely proprietary values (they are meant to just respond with "bearer" as that's how they actually intend to use that token) but because at least in the case of processGenericTokenEndpointResponse (oauth4webapi) and genericGrantRequest (openid-client) when making OAuth 2.0 Token Exchange N_A is used as a valid registered token type ("N_A is used to indicate that an OAuth 2.0 token_type identifier is not applicable in that context") |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Slack's token exchange endpoint sends back a response where the
token_type
can bebot
.Example response from above link
I'm using
openid-client
'sclient.authorizationCodeGrant
. I see that the response from Slack is successful but anUnsupportedOperationError
is thrown probably because of the following check:oauth4webapi/src/index.ts
Lines 3472 to 3474 in 3371192
Currently, I'm working around this by doing this:
Workaround
I've also checked
ClientCredentialsGrant
type but it doesn't work and Slack rejects it withinvalid_grant
error. Moreover, Slack itself suggests sendingauthorization_code
ingrant_type
.I've considered manually calling the API as well.
First of all, is this non-conforming in anyway? Do we need to check the token if they are
bearer
ordpop
? I couldn't find anything in the spec (Section 7.1) but I might be looking at the wrong place.If it is, then is this is the only way to handle non-conforming
token_type
? Can we introduce some config or customtoken_type
handler?Beta Was this translation helpful? Give feedback.
All reactions