auth0-authorization-extension
auth0-authorization-extension copied to clipboard
Invalid Token when accessing anything
I have just set up this extension and when I try to access any users I get the following 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.
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 ?
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:
- Navigate to https://manage.auth0.com
- Under "APIs" select
auth0-authorization-extension-api(this was automatically created when the Authorization Extension was setup) - Go to the "Test" tab
- Run one of the test
POSTrequests 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"
}
- Make requests to the management API using the
access_tokenfrom the previous step under Headers asAuthorization: Bearer <access_token>.