-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oauth2 client cannot refresh token #12742
Comments
I also want to add that when the Oauth server returns an error, the credential data is completely garbled in N8N, it seems the error handling or parsing in N8N is too light here :
For diagnosis, I looked at the credential content using the CLI n8n export:credentials, which returns this when the credential is fine and working :
and returns this when the credential is not working anymore :
|
Hey @gbarazer, We have an enhancement request opened internally to change how we handle the refresh and to move it to more of a background service rather than relying on a refresh when the auth fails. Oddly though I have not seen the current approach cause an error like this before, I do know that 1.74 and maybe 1.73 has some issues with oauth so it could be worth trying 1.75 to see if that helps. Can you share which service you are connecting to as well just so we can think about adding it to the test list if it is public. |
Also getting "Unable to sign without access token" with Google Sheets node since version 1.74.3 |
@lapms your issue is going to be different, Can you update to 1.75 which should work for you |
Hello,
We are using the generic Oauth2 credentials to run a HTTP request node and we are having failures only some times when the oauth2 token needs to be refreshed.
The credential is used in several active workflows, and it looks like there is a concurrency issue when the HTTP with an input payload of several items, because i notice in the debug logs that the token is refreshed several times in the same second and updated. The next issue is that when doing that the API server can once in a while rate limit or return an error, causing the oauthtokendata to be garbled and effectively disabling the token refresh capability.
I think the HTTP request node does not wait for the token refresh and database credential update to initialize its next run, causing a storm condition and refreshing the access_token several times in parallel, and this scenario cannot run with a refresh token strategy where a refresh token is burned immediately to get another access_token (the classic oauth flow).
Here is a log extract of what happens :
The text was updated successfully, but these errors were encountered: