Title: auth0 is returning &#8220;Unauthorized&#8221;
Last modified: November 24, 2020

---

# auth0 is returning “Unauthorized”

 *  [shorio](https://wordpress.org/support/users/shorio/)
 * (@shorio)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/auth0-is-returning-unauthorized/)
 * Our site, [https://billing.akana.com](https://billing.akana.com), started getting“
   Unauthorized” from auth0 and can no longer login. Since our admin console is 
   also linked with auth0, I cannot login to admin console, “wp-admin’, either.
   
   It looks like below code in WP_Auth0_LoginManager.php is getting “Unauthorized”
   from auth0. Our site has been working fine till recently. I tried to rename “
   plugins” directory to “plugins.xxx” so that I can disable plugins and access 
   to admin console, but it didn’t work. I was still getting auth failure after 
   renaming “plugins” dir. How can I fix this?
 *  $exchange_resp = WP_Auth0_Api_Client::get_token(
    $auth_domain, $client_id, 
   $client_secret, ‘authorization_code’, array( ‘redirect_uri’ => $this->a0_options-
   >get_wp_auth0_url(), ‘code’ => $this->query_vars( ‘code’ ), ) );
 * Here is the var_dump of the parameters we are sending to get_token:
 * string(29) “[https://akanacloud.auth0.com/&#8221](https://akanacloud.auth0.com/&#8221);
   
   array(2) { [“Auth0-Client”]=> string(136) “eyJuYW1lIjoid3AtYXV0aDAiLCJ2ZXJzaW9uIjoiMy43LjAiLCJlbnZpcm9ubWVudCI6eyJQSFAiOiI1LjUuOS0xdWJ1bnR1NC4yOSIsIldvcmRQcmVzcyI6IjQuNC4yNCJ9fQ
   ==” [“content-type”]=> string(33) “application/x-www-form-urlencoded” } array(
   5) { [“redirect_uri”]=> string(43) “[https://billing.akana.com/index.php?auth0=1&#8221](https://billing.akana.com/index.php?auth0=1&#8221);[“
   code”]=> string(16) “vdz7aW5M4PWt79x5” [“client_id”]=> string(32) “z5ae1cDXvEJNKwtUFm2SHprPO436nxDk”[“
   client_secret”]=> string(64) “6TP8lJsIK5KLU9m55VVXAeS9RLqdmiDTVB9x194YKcTjDgmDDpv7CwodL1MtBuj6”
 * Here is the var_dump of response we are getting from get_token:
 * array(5) {
    [“headers”]=> array(22) { [“date”]=> string(29) “Tue, 24 Nov 2020
   02:19:59 GMT” [“content-type”]=> string(16) “application/json” [“content-length”]
   => string(2) “60” [“connection”]=> string(5) “close” [“set-cookie”]=> array(3){[
   0]=> string(148) “__cfduid=dedd562a08def07af209184eec0d8a4da1606184399; expires
   =Thu, 24-Dec-20 02:19:59 GMT; path=/; domain=.auth0.com; HttpOnly; SameSite=Lax;
   Secure” [1]=> string(197) “did=s%3Av0%3A8d7776f0-2dfb-11eb-9e01-0d4c39c50c0e.
   i2h%2FyhF8%2BNAye6pYG2ypA5SCVtO30BqBTZPj%2BRFb6N4; Max-Age=31557600; Path=/; 
   Expires=Wed, 24 Nov 2021 08:19:59 GMT; HttpOnly; Secure; SameSite=None” [2]=>
   string(189) “did_compat=s%3Av0%3A8d7776f0-2dfb-11eb-9e01-0d4c39c50c0e.i2h%2FyhF8%
   2BNAye6pYG2ypA5SCVtO30BqBTZPj%2BRFb6N4; Max-Age=31557600; Path=/; Expires=Wed,
   24 Nov 2021 08:19:59 GMT; HttpOnly; Secure” } [“cf-ray”]=> string(20) “5f6fa5f26b13c1bb-
   IAD” [“cache-control”]=> string(85) “private, no-store, no-cache, must-revalidate,
   post-check=0, pre-check=0, no-transform” [“strict-transport-security”]=> string(
   16) “max-age=31536000” [“cf-cache-status”]=> string(7) “DYNAMIC” [“cf-request-
   id”]=> string(32) “0699a60b840000c1bb7e0f7000000001” [“expect-ct”]=> string(87)“
   max-age=604800, report-uri=”[https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”&#8221](https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”&#8221);[“
   ot-baggage-auth0-request-id”]=> string(16) “5f6fa5f26b13c1bb” [“ot-tracer-sampled”]
   => string(4) “true” [“ot-tracer-spanid”]=> string(16) “7ba1aa236bdaaf7f” [“ot-
   tracer-traceid”]=> string(16) “1aba8a3a5733375f” [“x-auth0-requestid”]=> string(
   20) “c68d0d9c0551d234d2e0” [“x-content-type-options”]=> string(7) “nosniff” [“
   x-ratelimit-limit”]=> string(2) “30” [“x-ratelimit-remaining”]=> string(2) “29”[“
   x-ratelimit-reset”]=> string(10) “1606184400” [“vary”]=> string(15) “Accept-Encoding”[“
   server”]=> string(10) “cloudflare” } [“body”]=> string(60) “{“error”:”access_denied”,”
   error_description”:”Unauthorized”}” [“response”]=> array(2) { [“code”]=> int(
   401) [“message”]=> string(12) “Unauthorized” } [“cookies”]=> array(3) { [0]=>
   object(WP_Http_Cookie)#67 (8) { [“name”]=> string(8) “__cfduid” [“value”]=> string(
   43) “dedd562a08def07af209184eec0d8a4da1606184399” [“expires”]=> int(1608776399)[“
   path”]=> string(1) “/” [“domain”]=> string(10) “.auth0.com” [“httponly”]=> string(
   0) “” [“samesite”]=> string(3) “Lax” [“secure”]=> string(0) “” } [1]=> object(
   WP_Http_Cookie)#66 (9) { [“name”]=> string(3) “did” [“value”]=> string(85) “s:
   v0:8d7776f0-2dfb-11eb-9e01-0d4c39c50c0e.i2h/yhF8+NAye6pYG2ypA5SCVtO30BqBTZPj+
   RFb6N4” [“expires”]=> int(1637741999) [“path”]=> string(1) “/” [“domain”]=> string(
   20) “akanacloud.auth0.com” [“max-age”]=> string(8) “31557600” [“httponly”]=> 
   string(0) “” [“secure”]=> string(0) “” [“samesite”]=> string(4) “None” } [2]=
   > object(WP_Http_Cookie)#65 (8) { [“name”]=> string(10) “did_compat” [“value”]
   => string(85) “s:v0:8d7776f0-2dfb-11eb-9e01-0d4c39c50c0e.i2h/yhF8+NAye6pYG2ypA5SCVtO30BqBTZPj
   +RFb6N4” [“expires”]=> int(1637741999) [“path”]=> string(1) “/” [“domain”]=> 
   string(20) “akanacloud.auth0.com” [“max-age”]=> string(8) “31557600” [“httponly”]
   => string(0) “” [“secure”]=> string(0) “” } } [“filename”]=> NULL }
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fauth0-is-returning-unauthorized%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘auth0 is returning “Unauthorized”’ is closed to new replies.

 * ![](https://ps.w.org/auth0/assets/icon-256x256.png?rev=3351758)
 * [Login by Auth0](https://wordpress.org/plugins/auth0/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/auth0/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/auth0/)
 * [Active Topics](https://wordpress.org/support/plugin/auth0/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/auth0/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/auth0/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [shorio](https://wordpress.org/support/users/shorio/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/auth0-is-returning-unauthorized/)
 * Status: not resolved