You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was an issue a while ago which seems to still be present.
If you have more than one client app (consumer) set up, you might find some apps getting signature mismatches.
After spending some time debugging the Authorization signature and headers being sent by a test client, and also looking deeply at the server signature generation, I discovered that the signature mismatch was due to get_consumer() (in class-wp-json-authentication.php) returning the wrong consumer.
This was an issue a while ago which seems to still be present.
If you have more than one client app (consumer) set up, you might find some apps getting signature mismatches.
After spending some time debugging the Authorization signature and headers being sent by a test client, and also looking deeply at the server signature generation, I discovered that the signature mismatch was due to
get_consumer()
(in class-wp-json-authentication.php) returning the wrong consumer.The current master has this query :
But this is returning an array of all consumers/registered applications. Not the one based on its key meta_value.
I can't seem to form the correct
meta_query
to give back the consumer I expect.So, changing the query to this has fixed is for me :
Which returns the correct consumer, and thus, the correct key to use when creating the signature to compare.
WP : beta nightlies 4.4-beta4-35724
WP-API/WP-API - WP-API-2.0-beta7
WP-API/OAuth1 - master as of today
The text was updated successfully, but these errors were encountered: