You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: Define precedence for deprecated 'auth_tokens' vs. 'auth_headers' (#237)
This PR addresses the scenario where a user provides both `auth_tokens` and `auth_headers`, both of which are deprecated arguments.
### Problem
Previously, if a user provided both `auth_tokens` and `auth_headers`, the authentication tokens from `auth_headers` were prioritized. This created an inconsistent behavior, especially considering that `auth_tokens` was deprecated more recently than `auth_headers`.
### Solution
This change shifts the precedence to `auth_tokens`. Now, if both `auth_tokens` and `auth_headers` are present, only the authentication tokens specified in `auth_tokens` will be considered.
### Reasoning
1. `auth_tokens` was deprecated more recently than `auth_headers`. Prioritizing the more recently deprecated argument provides a clearer signal to users about the intended deprecation path and guides them towards the recommended, non-deprecated args.
2. We opted *not* to merge authentication tokens from both deprecated arguments. Merging could lead to increased user confusion and inadvertently encourage continued reliance on these legacy features, hindering migration efforts.
3. This approach aligns with our broader deprecation strategy. For instance, when a user provides `auth_token_getters` (the current recommended approach) alongside a deprecated argument like `auth_tokens`, `auth_token_getters` takes precedence and overrides the deprecated argument. This PR extends that "latest argument wins" principle to the deprecated arguments themselves, ensuring consistent behavior.
0 commit comments