Coder Social home page Coder Social logo

OAuth callback isn't called about oauth1 HOT 9 OPEN

wp-api avatar wp-api commented on September 3, 2024
OAuth callback isn't called

from oauth1.

Comments (9)

romuloctba avatar romuloctba commented on September 3, 2024

U shoul use the provided token to make the authenticated requests

from oauth1.

mariorodriguespt avatar mariorodriguespt commented on September 3, 2024

Isn't this token supposed to be passed to my server via the callback? All I'm getting is page, show to the user, with the token. The callback isn't being called.

from oauth1.

romuloctba avatar romuloctba commented on September 3, 2024

I bet u r right. This is as far as i got too.

from oauth1.

lxcodes avatar lxcodes commented on September 3, 2024

@sblaz Do your commits work or just WIP? Would love to see a PR for this. Currently stuck here ourselves.

from oauth1.

sblaz avatar sblaz commented on September 3, 2024

I believe so, yes, although I was planning on doing a bit more testing before submitting a pull request. I was able to successfully authenticate with an OAuthSwift client after applying this and a couple of other patches - I'm not sure what happens if you just try to apply this one by itself. It's pretty simple, though, if you look at it, the oauth_callback parameter wasn't getting saved along with the other request token stuff.

from oauth1.

lxcodes avatar lxcodes commented on September 3, 2024

@sblaz Yup -- does look like that. Currently using your master branch -- removes the restrictive wp_http_validate_url looks like.

from oauth1.

sblaz avatar sblaz commented on September 3, 2024

Yes, that's right - I started by applying #33 but then wanted to use a custom url scheme so relaxed the validation further. Also had some issues with double-encoding of the oauth_callback parameter value. Applied #65 and then removed the two rawurlencode() calls in join_with_equals_sign() and it seems to be copacetic.

from oauth1.

jeremywho avatar jeremywho commented on September 3, 2024

Those changes got it working for me with OAuthSwift.

from oauth1.

coderkevin avatar coderkevin commented on September 3, 2024

In my case, normalize_parameters() is really messing up my already partially encoded parameters, so by removing normalize_parameters() instead, I was able to keep the rawurldecode() calls.

See: #91

@sblaz , I have created a PR which merges your changes with AlexC's and removes normalize_parameters() in favor of encoding them in the join_with_equals_sign() function: #92
If you're interested, would you mind checking out my approach and let me know if it works for you? I'll leave the callback-fix branch on my fork available for testing.

Thanks!

from oauth1.

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.