Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to application/x-www-form-urlencoded on verification #12

Closed
Zegnat opened this issue Jun 30, 2017 · 5 comments
Closed

Default to application/x-www-form-urlencoded on verification #12

Zegnat opened this issue Jun 30, 2017 · 5 comments
Labels

Comments

@Zegnat
Copy link
Collaborator

Zegnat commented Jun 30, 2017

I ran into this when testing against Telegraph. It sends an Accept header with */* but does not accept the JSON response (it seems).

Should we just default to application/x-www-form-urlencoded on the auth code verification step unless the Accept header specifies application/json?

@sknebel
Copy link
Collaborator

sknebel commented Jun 30, 2017

if it claims to accept */* that sounds like a bug in Telegraph, and and if I remember right I've seen other implementations that default to JSON (could be confusing it with token endpoints though). We should support both, but I'm not sure the default matters. /cc @aaronpk

@aaronpk
Copy link
Contributor

aaronpk commented Jun 30, 2017

Yeah sounds like Telegraph needs to send a better Accept header. Feel free to file an issue there and reference this one.

@Zegnat
Copy link
Collaborator Author

Zegnat commented Jun 30, 2017

Is there a preferred default though, @aaronpk? For those that do Accept: */*, or include neither application/x-www-form-urlencoded nor application/json?

Although in the case of the latter, we should probably just error with 406 Not Acceptable.

@Zegnat
Copy link
Collaborator Author

Zegnat commented Jul 10, 2017

indieauth/client supports JSON responses since version 0.2.0. Versions before that relied on application/x-www-form-urlencoded, which leads to problems in e.g. Telegraph.

That might be a reason for us to default to form encoding and only send JSON when requested.

@Zegnat
Copy link
Collaborator Author

Zegnat commented Aug 11, 2020

Going to close this issue. As per indieweb/indieauth#18 (comment) the specification is more than likely to stop allowing form encoded responses completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants