<#3727 fix: Retain returned OAuth refresh tokens> ...
# meltano-repo-activity
g
#3727 fix: Retain returned OAuth refresh tokens Pull request opened by ryanduguid Summary • retain a non-empty
refresh_token
returned by an OAuth token endpoint • preserve the current refresh token when a provider omits one • add regression coverage for both cases Motivation Some OAuth providers rotate refresh tokens. Without retaining the response value, the next refresh in a long-running process can reuse an invalidated token. This deliberately updates only the in-memory authenticator; it does not attempt config write-back (tracked separately in #106). Verification •
uv run --no-sync pytest tests/core/rest/test_authenticators.py -q --benchmark-skip
(45 passed) •
uvx ruff check singer_sdk/authenticators.py tests/core/rest/test_authenticators.py
•
uvx ruff format --check singer_sdk/authenticators.py tests/core/rest/test_authenticators.py
•
uv run --no-dev --with ty ty check singer_sdk/authenticators.py
Summary by Sourcery Ensure OAuth authenticators retain valid refresh tokens returned by providers and add regression coverage for refresh token handling. Bug Fixes: • Preserve existing OAuth refresh tokens when token endpoint responses omit a refresh_token. • Retain new non-empty OAuth refresh tokens returned by providers during token refresh. Tests: • Add regression tests verifying refresh tokens are updated when returned and preserved when omitted in OAuth token responses. meltano/sdk