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

Invalid or missing response type #84

Open
salmanpatnee opened this issue Dec 16, 2018 · 0 comments
Open

Invalid or missing response type #84

salmanpatnee opened this issue Dec 16, 2018 · 0 comments

Comments

@salmanpatnee
Copy link

I'm following a tutorial in which a stand alone app is sending oauth request to WordPress, already OAuth2 server plugin installed and its give me Invalid or missing response type
Here is the JSO config:

var ROOTURL = "http://wp-rest.oo";
const RESTROOT = ROOTURL + '/wp-json';

var jso = new jso.JSO({
    providerID: "WP Editor",
    client_id: "PJmIzB9SGeLnseknJDzgXwKUWd9XujA2zocyCMwM",
    redirect_uri: "http://wpedit-oauth.oo/",
    authorization: ROOTURL + "/oauth/authorize",
});
// Catching the response when the user is returning
jso.callback();

This is the calling function:

function oauthLogin() {
	console.info('Login button pressed!');
	let opts = {
		redirect_uri: "http://wpedit-oauth.oo/"
	}
	jso.getToken(opts)
	.then((token) => {
		console.log("I got the token: ", token)
	})
	.catch((err) => {
		console.error("Error from passive loader", err)
	})
}

Client is already registered in WordPress. So what is the issue??

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