-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
When trying to get the access token, Ebou sends a JSON-encoded payload to the /oauth/token
endpoint.
While this is fine with Mastodon (since Rails just deserializes based on the Content-Type
header), this causes issues with alternative implementations that actually follow the OAuth2 spec closely, which states that all the body contents have to be application/x-www-form-urlencoded
.
To cite RFC 6797; Section 4.1.1:
The client constructs the request URI by adding the following parameters to the query component of the authorization endpoint URI using the "application/x-www-form-urlencoded" format
Looking at the code, there seem to be two solutions to this:
- Submit everything to the API as
application/x-www-form-urlencoded
bodies. This should work fine. - Make a special case for the OAuth endpoints to submit the data as
application/x-www-form-urlencoded
instead ofapplication/json
(this is more effort, not sure if it's worth it)
Metadata
Metadata
Assignees
Labels
No labels