Giter VIP home page Giter VIP logo

api-console's People

Contributors

inderpreet99 avatar justinshreve avatar nylen avatar rachelbaker avatar rmccue avatar thenbrent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-console's Issues

Build a live version using gh-pages

If we can provide a modal/form to collect authentication data ( config.json ), we can use a hosted version on GitHub - that possibly uses cookies to store authentication - and thus anyone can use it without actually cloning/installing it.

How to use api-console

Hello,
Can anyone tell me where should I put api-console with my wordpress folder and activate it? I am trying to auth api not to public but only who has the key. Can anyone give me a direction how to do it? I have been stuck for few days...
Thank you

Conflict with Theme My Login: call to undefined function login_header

I get the following error:

Fatal error: Call to undefined function login_header() in ...wp-content/plugins/OAuth1/theme/oauth1-authorize.php on line 2

after I setup my config.json file and hit "Auth" in the lower right hand corner of the console screen. First, a small window pops up and then I see this error. The URL at the moment of the error:

http://{myurl}/login?action=oauth1_authorize&oauth_callback=http%3A%2F%2F{myurl}%2Fapi%2Fapi-console%2Fland.html&oauth_token={atoken}

If I log out of my site and run it, I DO see a login screen, but as soon as I login (in this flow) I get that error. Seeing as how this error is being triggered on a path not "owned" by this plugin, I did some digging ... and confident it has something to do w/my using a custom login screen at the "/login" URL.

In summary, to recreate, enable "Theme My Login" plugin. Setup "/login" as your login page and URL.

  1. Click Auth in the console. A small window pops up.
  2. (a) If I'm logged out, it'll give me the login form. I log in. I get the error.
  3. (b) If I'm logged in, I get the error.

I confirmed that if I disable the plugin, the authentication succeeds. But I still don't see anything in the viewer (which is likely a different issue). Even if it's beyond your control to "fix" perhaps there's a documentation update that can be made, since several folks use custom login screens. Thanks!

401 Authorization error: nonce?

Hello,

I would like to report an issue related to requests requiring authorization / user logged in:

For example, using the console, with an admin user who previously authorized the application:
https://oauth1.wp-api.org/docs/basics/Signing.html
POST /wp-json/wp/v2/posts
title=Hello%20World
=> returns a 401 error, "Sorry, you are not allowed to create posts as this user."
The user ID is 0 and the expected ID is 1.

Another example:
GET /wp/v2/users/me
=> returns a 401 error, "You are not currently logged in."

I have read on wordpress.stackexchange.com: here, there about nonces (X-WP-Nonce header) but this applies for plugins or themes.
I also know an auth nonce is sent with the Authorization header.
So, the question is how to have the user logged in / a valid nonce?

Auth button fails

When i hit the auth button the /oauth1/request returns a 400 (Bad Request) error

Updated Readme

It should be noted that once installed, the API Console interface, looks nothing like the actual API Console it references. It might be obvious to others, but wasn't to me.

Auth button fails with "Callback URL is invalid"

I followed the instructions in the readme (wp oauth1 add) then get this error when I try to authenticate:

image

There is no callback property on the json_consumer post object, so this check in check_callback fails:

$registered = $consumer->callback;
if ( empty( $registered ) ) {
    return false;
}

I saw a comment referencing doing this from the admin area instead (WP-API/OAuth1#53 (comment)) but I couldn't find where.

README doesn't cover prerequisites

In "Step 1: Creating a Consumer", the README describes running 'wp oauth1 add' on the command line. This requires wp-cli, right? Had to figure that out myself. Now I've installed wp-cli, so I can run that command, but it gives me no output. Am I missing something else? More info please! README should mention/link to pre-reqs.

OAuth signature does not match

Hi I have this set up at the below url
https://man-sudarshann-1.c9.io/api/

I am getting this error OAuth signature does not match. I have tried all the fixed for this over the internet. but none helped

$signature = 5rPsul6zplhfNvb4o+Mz11O/OyI=
$consumer_signature = 3ko8DUsUUEB4Hqaks68vGYnTjQM=

if ( ! hash_equals( $signature, $consumer_signature ) ) {
return new WP_Error( 'json_oauth1_signature_mismatch', __( 'OAuth signature does not match' ), array( 'status' => 401 ) );
}

I guess the API console is generating wrong signature. Please help me with this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.