OAuth2 with token_endpoint_auth_method: client_secret_basic

Describe the problem/error/question

n8n OAuth2 WebRequest fails on response from service provider (refresh token scenario). I assume n8n doesn’t implement this auth method (yet), so I am not sure if this should be feature request instead.

What is the error message (if any)?

{
"status":
"rejected",
"reason":
{
"body":
{
"error":
"invalid_client",
"error_description":
"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).
The OAuth 2.0 Client supports client authentication method 'client_secret_post', but method 'client_secret_basic' was requested.
You must configure the OAuth 2.0 client's 'token_endpoint_auth_method' value to accept 'client_secret_basic'."
},
"code":
"EAUTH"
}
}

Information on your n8n setup

  • n8n version: 0.221.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Ubuntu

I’m not a programmer so I can’t help you, but oauth2 is available. If I was able to set it up myself, I’m sure you just overlooked a small step

I had to ask ChatGPT… I hope it makes sense to you

Hi @unicornParty, welcome to the community :tada:

The ChatGPT response might not be super helpful here unfortunately, as it simply suggests the error thrown by n8n is application specific.

@DRone n8n should refresh tokens in general, but this might not work with all services, especially if they do things slightly different from the majority. I came across a similar problem myself recently. Do you have any more information about the service you are trying to connect to? Any documentation?

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.