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

Callback URI #191

Open
scbritton opened this issue Dec 12, 2016 · 0 comments
Open

Callback URI #191

scbritton opened this issue Dec 12, 2016 · 0 comments

Comments

@scbritton
Copy link

I'm stumped on the callback leg of the OAuth process. I've been going around in circles for ages, and I really don't know what I'm supposed to be doing here.

I'll define a few terms first so we all know what I'm talking about.

SERVER: A wordpress site which contains the REST API with OAuth1 Plugin. (http://server.ext)
CLIENT: A wordpress site which wants to access the REST API interface via the consumer key/secret pair set up on the server. (http://client.ext)

It seems to be the case that the CALLBACK needs to be an absolute URI, with a path directly to a PHP file on he server. If the php file is on the client, then the callback url will change every time.

For example, I have set up the callback file as "callback.php", and, initially, I set it up as a custom page template residing inside the active theme folder. It contains one (and only one) line of code:

echo 'FOOBAR';

The intent being to prove that the callback is being accessed.

This ONLY works if I set up the callback uri as http://server.ext/wp-content/themes/{active_theme_name}/callback.php

As a page template, I can obviously create a page with the appropriate page slug, but this comes back as an invalid callback url.

When I send the callback url as part of my request header, it needs to match the callback url in the setup screen exactly.

The problem then is this - how in heaven's name do I get the verifier token and temporary token and secret back to the client that wants to authenticate with the server, if the callback.php file has to reside on the server side?

I'm totally stuck at this point, as right now, this just doesn't make sense to me. I'm obviously missing something.

Please help.

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

No branches or pull requests

1 participant