auth0-authorization-extension icon indicating copy to clipboard operation
auth0-authorization-extension copied to clipboard

Invalid Token when accessing anything

Open patoncrispy opened this issue 8 years ago • 2 comments

I have just set up this extension and when I try to access any users I get the following error: error

When I stream the log output to my local console I get the following output:

data: Response: {
      "data": null,
      "isBoom": true,
      "isServer": false,
      "output": {
        "statusCode": 401,
        "payload": {
          "statusCode": 401,
          "error": "Unauthorized",
          "message": "Invalid token"
        },
        "headers": {
          "WWW-Authenticate": "Token error=\"Invalid token\""
        }
      }
    }

It occurs repeatedly for (what seems like) any call to the Manangment API. I have admin rights (I created our Auth0 account), so I'm not sure why this is happening.

patoncrispy avatar Feb 03 '17 14:02 patoncrispy

I get this as well. I'm currently migrating by hand from a previous account (because Auth0 cannot). Is there a way to install a previous (working) version ?

Floby avatar Feb 20 '17 17:02 Floby

I had this issue as well and resolved it by first requesting the correct Bearer token, and then making calls against the API with that value. To request the correct Bearer token, you must do the following:

  1. Navigate to https://manage.auth0.com
  2. Under "APIs" select auth0-authorization-extension-api (this was automatically created when the Authorization Extension was setup)
  3. Go to the "Test" tab
  4. Run one of the test POST requests and you will be returned with a response similar to the following:
{
    "access_token": "<secret access token will be here>",
    "scope": "read:users read:applications read:connections read:configuration update:configuration read:groups create:groups update:groups delete:groups read:roles create:roles update:roles delete:roles read:permissions create:permissions update:permissions delete:permissions read:resource-server create:resource-server update:resource-server delete:resource-server",
    "expires_in": 86400,
    "token_type": "Bearer"
}
  1. Make requests to the management API using the access_token from the previous step under Headers as Authorization: Bearer <access_token>.

dwilhel1 avatar Dec 30 '19 18:12 dwilhel1