Closed imrehg closed 1 year ago
@girarda and @brianjlai can you take a look?
@imrehg do you need any help to make the contribution?
Unfortunately, there are no ways to update refresh tokens at the moment. This is something the team is working on this quarter https://github.com/airbytehq/airbyte/issues/3990
Thanks @girarda, that's very useful! @marcosmarxm I took a look and would have some ideas how to approach this, but it might not align well with what the team's already doing. So I might look but not necessarily change anything to not duplicate work, unless of course you have specific guidance to still contribute and avoid that.
Also realised that it is likely more of a feature request than a bug, but probably pretty borderline. Thanks for the updates on this!
closing because single use refresh tokens are supported (using Overwrite config with refresh token response
)
@girarda do we have example in our docs explaining how to use it?
Yes, @marcosmarxm
For the connector builder: https://docs.airbyte.com/connector-development/connector-builder-ui/authentication#update-refresh-token-from-authentication-response
Environment
Current Behavior
I'm implementing a low-code connector using OAuth 2.0 (following this docs), and the source has an OAuth 2.0 flow where the
refresh_token
is single-use. When theaccess_token
is refreshed, one has to also save the returned (new)refresh_token
, otherwise won't be able do another refresh later on. See that source's docs:As much as I see,
airbyte_cdk.sources.streams.http.requests_native_auth.abstract_oauth.AbstractOauth2Authenticator
doesn't support that flow, and thus I end up in the connector a successful connection test, but after that unable to run any sync jobs the way AirByte checks connectivity starting with therefresh_token
all the time.Expected Behavior
If the access token request sends back a new refresh token, update the stored value with that one. Potentially being able to define a
refresh_token_name
.Logs
Hard to know what logs to include here, happy to add if anything specific requested.
Steps to Reproduce
Just one example, I'm not sure whether there are other sources with similar OAuth 2.0 behaviour that could be used.
For Monzo specifically:
spec.yaml
andmonzo.yaml
for it.Are you willing to submit a PR?
Yes.