Closed richchurcher closed 5 months ago
https://www.rfc-editor.org/rfc/rfc8693#section-4.2 strongly implies it ought to be a space-delimited string.
Argh. https://github.com/twitchdev/issues/issues/164#issuecomment-677805012 :face_exhaling:
Thanks for your feedback regarding the scope format. While we strive to follow RFCs as closely as possible, occasionally deviations do occur. Changing our scope value from an array to a space-separated string would be a significant breaking change for existing applications. Making this change to be inline with the RFC does not outweigh the disruption it will cause, so we will not be updating the format in the current implementation. This may be something to consider in a future implementation, but as there is no action at this time, this issue will be closed.
I don't suppose there's any way to "pre-format" a response before the error is generated, is there? Otherwise I guess I'll keep matching on the ParseError
and returning a modified response.
As you've deduced, this is a problem on Twitch's end, and this crate only strives for compatibility with the published standards.
See ramosbugs/oauth2-rs#269, ramosbugs/oauth2-rs#52, and ramosbugs/oauth2-rs#146 for suggested workarounds.
Thanks so much! I'm so sorry I didn't find the other issues... was looking in the wrong repo.
Interacting with Twitch's OIDC flow. I'm able to get the code from Twitch OIDC just fine. However, the response to
client.exchange_code
is treated as aParseError
:JSON response extracted from the error:
Is Twitch simply non-compliant with the RFC? Obviously I can work around by modifying the response. This is perhaps the last obstacle, after which I should be able to contribute an example for Twitch.