Skip to content

Generated Authentication Cookie Doesnt work as expected outside the plugin functions #9

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

Open
emmjk opened this issue Apr 16, 2018 · 0 comments

Comments

@emmjk
Copy link

emmjk commented Apr 16, 2018

I have been working with the plugin for weeks now and have observed something that might need a change .
Generation of authentication cookie : The Plug in has a clear way and direct way of generating the cookie , but if the cookie generated by the plugin is used in the context or environment that wont require plugin code the cookie doesnt work as supposed to . What do i mean is -> If you use browser to create a post using JSON Api plugin , this plugin uses the cookie that is generated automatically by the browser as you must login into your wordpress website for this to work and it will work clearly without any error . But if you now logout from your wordpress site and use cookie generated by this plugin JSON API User the result of the post creation would be

Your 'nonce' value was incorrect. Use the 'get_nonce' API method.

It just wont work , even though with the browser's cookie everything worked . But I cant say that the cookie generated from your plugin is wrong because if it were wrong the result of creating a post from a JSON API plugin could have been

You need to login with a user that has 'edit_posts' capacity.

So try to test your plugin cookie with the create_post method from JSON API and see how you can modify the code for it to work (Post creation) . And if this is to be successful it will now be possible to create a post from any environment - like android application to wordpress website or ios application to wordpress website

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