I have a connector for Personio that I have built ...
# help-connector-development
d
I have a connector for Personio that I have built as a Python CDK connector - although only basic support for the streams so far - however this connector would work with the normal custom connector process, except that it has a different authentication flow. Is there a way to create a custom auth only, or would you accept a general feature to Airbyte that supports this flow? it is an auth endpoint on the API that generates a single use bearer token. Each response when paginating includes the next single use bearer token.
k
A message from kapa.ai
Based on the information provided in the extracts, Airbyte's Connector Development Kit (CDK) supports basic and OAuth2.0 authentication via the
TokenAuthenticator
and
Oauth2Authenticator
classes respectively. Both authentication strategies place the API token in the
Authorization
header. The
OAuth2Authenticator
goes an additional step further and has mechanisms to, given a refresh token, refresh the current access token. However, it currently only supports refresh tokens and not the full OAuth2.0 loop [source](https://docs.airbyte.com/connector-development/cdk-python/http-streams). For complex custom authentication schemes involving signing requests or doing multiple requests to authenticate, it's recommended to use the low-code CDK or Python CDK [source](https://docs.airbyte.com/connector-builder-ui/authentication). In a forum discussion, a user mentioned a similar case where the refresh token is only valid for a single use. The user found a solution in the
SingleUseRefreshTokenOauth2Authenticator
class, which was introduced in a recent PR [#19428 - CDK: Emit control message on config mutation](https://github.com/airbytehq/airbyte/pull/19428) [source](https://discuss.airbyte.io/t/3275). If the existing authentication methods do not meet your requirements, you can create a custom component by defining a new class in a new file in the connector's module. The class must implement the interface of the component it is replacing. For instance, a pagination strategy must implement
airbyte_cdk.sources.declarative.requesters.paginators.strategies.pagination_strategy.PaginationStrategy
[source](https://docs.airbyte.com/connector-development/config-based/advanced-topics). If the feature you need is not currently supported, you can create a feature request issue on the Airbyte GitHub page [source](https://docs.airbyte.com/connector-development/cdk-python).
j
This sounds a lot like this planned issue: https://github.com/airbytehq/airbyte/issues/26901
We are planning to tackle this in the near to mid term anyway as it's often requested
d
Thanks Joe - yes, that sounds like it'll hit the spot.