So, I did a little more investigation here, and discovered that if I am logged out of the oauth server site, the oauth login process works, but if I am already logged in to the oauth server site, I get the error above.
But this is the exact scenario I am aiming for: having the user log into the server site, then be able to access the secondary site without having to login again.
Any thoughts?
Sorry for the delay is response. This is an odd error as the authorization code grant type should always be available. I am going to run some tests today and I will update this thread.
Thanks
I have ran tests on the actual plugin and I am not able to replicate the issues using the correct flow. With this said, I am able to replicate the error by requesting a token after the code as expired or has been called more than once.
– Ensure that you are only trying to use the authorization code 1 time only.
– Ensure that the authorization code table exists (not likely an issue)
I am going to assume it has something to do with how your client is handling the flow.
Thanks for looking into it, Justin. I’m using the code exactly as described here:
https://wp-oauth.com/documentation/how-tos/setup-wp-oauth-server-single-sign/
As I said, this works correctly when I am not logged into the server site already, but that flow isn’t ideal.
Is there any other help you can provide?
I got it working!
I just recreated everything from scratch. I think that perhaps the first time I built it, my timezones were messed up, then I fixed it, and must have made a mistake in the trouble-shooting. Then, after I fixed the timezones, I rebuilt it and it’s working.
Thanks Justin for your time looking into this issue. I appreciate your support.
Glad that you got it working!