Git Product home page Git Product logo

Comments (7)

sndsgd avatar sndsgd commented on June 2, 2024

Thanks for creating this issue 👌

should be in JSON, if Content-Type is set to application/json

Can you clarify what you mean here? The endpoint should always return application/x-www-form-urlencoded as defined by the spec, and in my testing the response Content-Type is never application/json.

We'll merge an update to include the oauth_callback_confirmed response property, and indicate the response content type is application/x-www-form-urlencoded. Please let me know if that'll cover the items in this issue.

from docs.

ThisIsMissEm avatar ThisIsMissEm commented on June 2, 2024

Oh! Interesting!

I must've missed that in my fairly loose implementation of oauth 1.0a; I can see that I'm meant to send data via x-www-form-urlencoded (or query params), but if I send with Accept: application/json or Content-Type: application/json then the server doesn't reject the request, instead it just returns back application/x-www-form-urlencoded responses.

I'd been sending requests all with Accept: application/json, and was confused when I got back a different content-type; Perhaps returning a 406 Not Acceptable error if the Accept is sent and it is not application/x-www-form-urlencoded would be appropriate?

JSON APIs have spoiled me 😆

from docs.

sndsgd avatar sndsgd commented on June 2, 2024

Thanks for clarifying! We just merged an update to the docs: ef3f1b1, but I'll keep this issue open until we also implement the 406 response for the applicable routes 👌

from docs.

nightpool avatar nightpool commented on June 2, 2024

from docs.

sndsgd avatar sndsgd commented on June 2, 2024

I'm a little worried that the 406 response is going to be a breaking change
for clients that were unknowingly setting the Accept header previously

Agreed! Whenever we want to make this sort of change we log first to verify we won't break anything for anyone. If there are any hits we'll probably just drop the change, but we can also consider only enabling it for apps that are created going forward.

from docs.

sndsgd avatar sndsgd commented on June 2, 2024

Over the past few weeks we've had more than a handful of requests made to the /oauth/... endpoints with invalid accept headers. In the spirit of not breaking existing implementations we will not be introducing further changes at this time.

from docs.

ThisIsMissEm avatar ThisIsMissEm commented on June 2, 2024

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.