OAuth authentication issue with client_credentials flow in custom connector

Summary

The user is facing an issue with OAuth authentication using the client_credentials flow in a custom connector. Airbyte is expecting a refresh_token even though it’s not needed for this flow.


Question

Hello, Airbyte :wave: people! I am pretty sure I have found a bug.

I’m running into an issue with OAuth authentication using the client_credentials flow for a custom connector. Here’s a breakdown of the problem:

  • I’m trying to retrieve a bearer access_token that expires and needs to be refreshed using client_id and client_secret (standard client_credentials flow).
  • I’ve set up the Airbyte config to use grant_type: client_credentials, and there is no need for a refresh_token, as this flow doesn’t use it.
  • However, I keep getting this error:
    ``` OAuthAuthenticator needs a refresh_token parameter if grant_type is set to refresh_token```` I've confirmed that the token endpoint works fine using curland Postman. The issue seems to be that Airbyte is still expecting arefresh_token`, which shouldn’t be the case here.

Here’s what I need help with:

  1. Does Airbyte support OAuth with the client_credentials grant type where the access_token expires and must be refreshed without a refresh_token?
  2. How can I configure Airbyte to send the access_token in the headers of API requests and automatically refresh it when needed?
  3. Is there a specific way to configure this setup within Airbyte’s low-code framework?

I appreciate any guidance or examples of how to configure this properly! Thanks in advance for your help. :pray:



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["oauth-authentication", "client-credentials-flow", "custom-connector", "access-token", "refresh-token", "error"]

https://github.com/airbytehq/airbyte/issues/46903

I’ve created a <Issues · airbytehq/airbyte · GitHub issue>. I hope this can be resolved soon; I would love to use Airbyte for my project.