openid-connect-generic icon indicating copy to clipboard operation
openid-connect-generic copied to clipboard

Invalid authorization code

Open sidneivl opened this issue 6 years ago • 0 comments

Hi,

I'm facing a issue about this authorization code on local machine, I'm receiving this info: /wp-admin/admin-ajax.php?action=openid-connect-authorize&code=1KIn6H&state=093a71b45069ec6e5a79382cd3c78d62

but after login I'm redirect to /wp-login.php?login-error=invalid_grant&message=Invalid+authorization+code%3A+1KIn6H

How I'm not the dev that implement it, I'm lost.

The log show me:

object(WP_Error)#10352 (2) {
  ["errors"]=>
  array(1) {
    ["invalid_grant"]=>
    array(1) {
      [0]=>
      string(34) "Invalid authorization code: 1KIn6H"
    }
  }
  ["error_data"]=>
  array(1) {
    ["invalid_grant"]=>
    array(6) {
      ["headers"]=>
      object(Requests_Utility_CaseInsensitiveDictionary)#10353 (1) {
        ["data":protected]=>
        array(13) {
          ["cache-control"]=>
          string(8) "no-store"
          ["content-type"]=>
          string(30) "application/json;charset=UTF-8"
          ["date"]=>
          string(29) "Fri, 25 Oct 2019 16:44:58 GMT"
          ["pragma"]=>
          string(8) "no-cache"
          ["server"]=>
          string(6) "Apache"
          ["set-cookie"]=>
          string(90) "SESSION=M2EyYzZlMjAtOGYxZS00ZDVlLTk3ZDUtZmQ5OTJhZTMwMWM1; Path=/connect/; Secure; HttpOnly"
          ["strict-transport-security"]=>
          string(36) "max-age=31536000 ; includeSubDomains"
          ["via"]=>
          string(24) "1.1 api-eu.xxxxxxx.net"
          ["x-content-type-options"]=>
          string(7) "nosniff"
          ["x-correlation-id"]=>
          string(36) "cd4d614a-a96e-421f-8d61-4aa96e921fe5"
          ["x-frame-options"]=>
          string(4) "DENY"
          ["x-xss-protection"]=>
          string(13) "1; mode=block"
          ["content-length"]=>
          string(2) "82"
        }
      }
      ["body"]=>
      string(82) "{"error":"invalid_grant","error_description":"Invalid authorization code: 1KIn6H"}"
      ["response"]=>
      array(2) {
        ["code"]=>
        int(400)
        ["message"]=>
        string(11) "Bad Request"
      }
      ["cookies"]=>
      array(1) {
        [0]=>
        object(WP_Http_Cookie)#10354 (5) {
          ["name"]=>
          string(7) "SESSION"
          ["value"]=>
          string(48) "M2EyYzZlMjAtOGYxZS00ZDVlLTk3ZDUtZmQ5OTJhZTMwMWM1"
          ["expires"]=>
          NULL
          ["path"]=>
          string(9) "/connect/"
          ["domain"]=>
          string(20) "api-eu.xxxxxxx.net"
        }
      }
      ["filename"]=>
      NULL
      ["http_response"]=>
      object(WP_HTTP_Requests_Response)#10355 (5) {
        ["response":protected]=>
        object(Requests_Response)#10356 (10) {
          ["body"]=>
          string(82) "{"error":"invalid_grant","error_description":"Invalid authorization code: 1KIn6H"}"
          ["raw"]=>
          string(636) "HTTP/1.1 400 Bad Request
Cache-Control: no-store
Content-Type: application/json;charset=UTF-8
Date: Fri, 25 Oct 2019 16:44:58 GMT
Pragma: no-cache
Server: Apache
Set-Cookie: SESSION=M2EyYzZlMjAtOGYxZS00ZDVlLTk3ZDUtZmQ5OTJhZTMwMWM1; Path=/connect/; Secure; HttpOnly
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
Via: 1.1 api-eu.decathlon.net
X-Content-Type-Options: nosniff
X-Correlation-Id: cd4d614a-a96e-421f-8d61-4aa96e921fe5
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 82
Connection: Close

{"error":"invalid_grant","error_description":"Invalid authorization code: 1KIn6H"}"
          ["headers"]=>
          object(Requests_Response_Headers)#10357 (1) {
            ["data":protected]=>
            array(13) {
              ["cache-control"]=>
              array(1) {
                [0]=>
                string(8) "no-store"
              }
              ["content-type"]=>
              array(1) {
                [0]=>
                string(30) "application/json;charset=UTF-8"
              }
              ["date"]=>
              array(1) {
                [0]=>
                string(29) "Fri, 25 Oct 2019 16:44:58 GMT"
              }
              ["pragma"]=>
              array(1) {
                [0]=>
                string(8) "no-cache"
              }
              ["server"]=>
              array(1) {
                [0]=>
                string(6) "Apache"
              }
              ["set-cookie"]=>
              array(1) {
                [0]=>
                string(90) "SESSION=M2EyYzZlMjAtOGYxZS00ZDVlLTk3ZDUtZmQ5OTJhZTMwMWM1; Path=/connect/; Secure; HttpOnly"
              }
              ["strict-transport-security"]=>
              array(1) {
                [0]=>
                string(36) "max-age=31536000 ; includeSubDomains"
              }
              ["via"]=>
              array(1) {
                [0]=>
                string(24) "1.1 api-eu.xxxxxxx.net"
              }
              ["x-content-type-options"]=>
              array(1) {
                [0]=>
                string(7) "nosniff"
              }
              ["x-correlation-id"]=>
              array(1) {
                [0]=>
                string(36) "cd4d614a-a96e-421f-8d61-4aa96e921fe5"
              }
              ["x-frame-options"]=>
              array(1) {
                [0]=>
                string(4) "DENY"
              }
              ["x-xss-protection"]=>
              array(1) {
                [0]=>
                string(13) "1; mode=block"
              }
              ["content-length"]=>
              array(1) {
                [0]=>
                string(2) "82"
              }
            }
          }
          ["status_code"]=>
          int(400)
          ["protocol_version"]=>
          float(1.1)
          ["success"]=>
          bool(false)
          ["redirects"]=>
          int(0)
          ["url"]=>
          string(48) "https://api-eu.xxxxxx.net/connect/oauth/token"
          ["history"]=>
          array(0) {
          }
          ["cookies"]=>
          object(Requests_Cookie_Jar)#10358 (1) {
            ["cookies":protected]=>
            array(1) {
              ["SESSION"]=>
              object(Requests_Cookie)#10359 (5) {
                ["name"]=>
                string(7) "SESSION"
                ["value"]=>
                string(48) "M2EyYzZlMjAtOGYxZS00ZDVlLTk3ZDUtZmQ5OTJhZTMwMWM1"
                ["attributes"]=>
                object(Requests_Utility_CaseInsensitiveDictionary)#10360 (1) {
                  ["data":protected]=>
                  array(4) {
                    ["path"]=>
                    string(9) "/connect/"
                    ["secure"]=>
                    bool(true)
                    ["httponly"]=>
                    bool(true)
                    ["domain"]=>
                    string(20) "api-eu.xxxxx.net"
                  }
                }
                ["flags"]=>
                array(4) {
                  ["creation"]=>
                  int(1572021899)
                  ["last-access"]=>
                  int(1572021899)
                  ["persistent"]=>
                  bool(false)
                  ["host-only"]=>
                  bool(true)
                }
                ["reference_time"]=>
                int(1572021899)
              }
            }
          }
        }
        ["filename":protected]=>
        NULL
        ["data"]=>
        NULL
        ["headers"]=>
        NULL
        ["status"]=>
        NULL
      }
    }
  }
}

Anyone know about this error?

Thanks

sidneivl avatar Oct 25 '19 17:10 sidneivl