Auth0 authentication - token expiry

Describe the problem/error/question

When using the Auth0 authentication provider to retrieve statistics from the Auth0 management API, I receive a token refresh error. Immediately after ‘reconnecting’ the authentication it will work, but the next run (24hrs later) will fail.

What is the error message (if any)?

401 - "{"statusCode":401,"error":"Unauthorized","message":"Expired token received for JSON Web Token validation","attributes":{"error":"Expired token received for JSON Web Token validation"}}"

Please share your workflow

Share the output returned by the last node

No output - error as above occurs on the “MAU from Logs” node.

Information on your n8n setup

  • n8n version: 1.60.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Kubernetes
  • Operating system: Linux

Hey @Tom_Anderson,

I suspect this could be down to an issue with the pagination in the HTTP Request node, NODE-1803 is our internal ticket to resolve this.

For now the best option is to manually build out the pagination loop.

Hi Jon,
The interesting thing is that this works if I run it manually, it’s only after token expiry that it does not. Pagination also does not take effect at the moment as all results are on a single page.

I did however note that there is a specific Auth0 node, and have converted to use it with a successful run overnight. I’ll keep monitoring.

Tom

1 Like

Update on this - failed again this morning, same issue. So perhaps it is the bug afterall, I have removed the pagination options and I have been able to run what I need without reauthenticating.

Is there a way I can contribute a data point to that ticket?

Hey @Tom_Anderson,

You can add any inforamtion here, I am already aware of a bug where OAuth tokens are not refreshed when using pagination built into the node. I think we are just missing the response check.

Thanks Jon. This would seem to be the issue, ever since removing pagination I have not had any issues so I won’t add anything further. Hope to see this resolved soon!