• Resolved John Lund

    (@johnlund1)


    Hi Justin,

    I’m trying to setup SSO on my WordPress install using: https://wp-oauth.com/documentation/how-tos/setup-wp-oauth-server-single-sign/

    I’ve gotten pretty far, but have come up against an error I can’t seem to solve:

    {“error”:”invalid_grant”,”error_description”:”authorization_code doesn’t exist or is invalid for the client”}

    I’ve tried uninstalling and recreating everything from scratch. I’ve checked my timezones. I’ve checked everything I can think of, but I’m not an oauth expert.

    What other issues would cause this error?

    Thanks!
    John

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter John Lund

    (@johnlund1)

    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?

    Plugin Author Justin Greer

    (@justingreerbbi)

    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

    Thread Starter John Lund

    (@johnlund1)

    Thanks Justin,

    Any updates on this?

    Plugin Author Justin Greer

    (@justingreerbbi)

    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.

    Thread Starter John Lund

    (@johnlund1)

    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?

    Thread Starter John Lund

    (@johnlund1)

    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.

    Plugin Author Justin Greer

    (@justingreerbbi)

    Glad that you got it working!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Invalid Grant’ is closed to new replies.