I've been testing this library out with the device code flow feature in the Dex Authorization framework (https://github.com/dexidp/dex) and it doesn't seem to work properly.
After digging into the code a little bit, I realized that this library expects the response to be encoded as a form. If it does not receive a response in that form, it falls back to the webapp flow.
Closing because this isn't actually a bug from this library, it's a bug in Dex. This library does check if the encoding is a JSON response type, Dex is just not appending that header in the response.
I've been testing this library out with the device code flow feature in the Dex Authorization framework (https://github.com/dexidp/dex) and it doesn't seem to work properly.
After digging into the code a little bit, I realized that this library expects the response to be encoded as a form. If it does not receive a response in that form, it falls back to the
webapp
flow.However, the official RFC for the Device Code flow explicitly expects a JSON response.
Would a PR that allows for both response types be welcome?