You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 of application/json (this is more effort, not sure if it's worth it)
The text was updated successfully, but these errors were encountered:
Submit everything to the API as application/x-www-form-urlencoded bodies. This should work fine.
I wonder if other SNS can handle application/x-www-form-urlencoded other than OAuth endpoints. Does this way work fine for other SNS? e.g. Pleroma and Friendica.
Make a special case for the OAuth endpoints to submit the data as application/x-www-form-urlencoded instead of application/json (this is more effort, not sure if it's worth it)
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 beapplication/x-www-form-urlencoded
.To cite RFC 6797; Section 4.1.1:
Looking at the code, there seem to be two solutions to this:
application/x-www-form-urlencoded
bodies. This should work fine.application/x-www-form-urlencoded
instead ofapplication/json
(this is more effort, not sure if it's worth it)The text was updated successfully, but these errors were encountered: