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

get access token in two steps #92

Open
mostafaabd opened this issue Apr 29, 2019 · 0 comments
Open

get access token in two steps #92

mostafaabd opened this issue Apr 29, 2019 · 0 comments

Comments

@mostafaabd
Copy link

Hello,
I am using WordPress and plugin OAuth 2.0 plugin for WordPress https://wp-oauth.com/
This plugin requires 2 steps to get access token you can read this https://wp-oauth.com/docs/general/grant-types/authorization-code/

First, Send client_id and response_type this response with code, i read documentation but i can't get access_token form this code

var jso = new jso.JSO({
	providerID: "taskbook",
	client_id: "SZgnn4zvPNl8WiQ3KFL7WRGGhf2PNDW4RZ5UVSR3",
	//client_secrett: "wy9EVNSYSKV9LQ2ebgwzeUpGZBc78gCjV3KtuczG",
	redirect_uri: "http://127.0.0.1/taskbook/index.html",
	response_type : "code",
	authorization: ROOTURL + "/oauth/authorize",
	token	: ROOTURL + "/oauth/token",
	debug: true,
});

Second, I use 'code' that comes from the first step and send it again and add these parameters to jso.getToken()
{
grant_type : "authorization_code"
code: code
}

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