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

OAuth callback isn't called #59

Open
mariorodriguespt opened this issue May 9, 2015 · 9 comments
Open

OAuth callback isn't called #59

mariorodriguespt opened this issue May 9, 2015 · 9 comments
Labels

Comments

@mariorodriguespt
Copy link

I tried to setup a callback but it's never called. The oauth documentation says that I must provide oauth_callback parameters but I get an error saying that the callback is missing. It works if I use callback, after the user grants the authorisation I'm shown a page with a verification token. What am I supposed to do with this token? Why the callback isn't called?

@romuloctba
Copy link

U shoul use the provided token to make the authenticated requests

@mariorodriguespt
Copy link
Author

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.

@romuloctba
Copy link

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

sblaz added a commit to sblaz/OAuth1 that referenced this issue Jun 5, 2015
sblaz added a commit to sblaz/OAuth1 that referenced this issue Jun 5, 2015
sblaz added a commit to sblaz/OAuth1 that referenced this issue Jun 5, 2015
@lxcodes
Copy link

lxcodes commented Jun 25, 2015

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

@sblaz
Copy link

sblaz commented Jun 25, 2015

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.

@lxcodes
Copy link

lxcodes commented Jun 25, 2015

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

@sblaz
Copy link

sblaz commented Jun 25, 2015

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.

@jeremywho
Copy link

Those changes got it working for me with OAuthSwift.

@coderkevin
Copy link

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!

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

7 participants