Repository navigation
[v3-3-test] Drop the redundant OAuth2 branch from get_user and collect_request_tokens (#72889) - #72943
Merged
Conversation
…t_request_tokens (#72889) `HTTPBearer` and `OAuth2PasswordBearer` both extract the same `Authorization: Bearer` header, so declaring both as dependencies produces the same string twice. `get_user` had a dead branch for the OAuth2 side (the bearer branch above it always matched first), and `collect_request_tokens` deduped the duplicate anyway. Keep `oauth2_scheme` declared as an unused parameter so the OpenAPI security spec is unchanged and ``/docs`` still renders the OAuth2 password login form. Only the runtime dead code goes. (cherry picked from commit 677b4ab) Co-authored-by: Pierre Jeambrun <[email protected]>
1 task done
vatsrahul1001
marked this pull request as ready for review
September 11, 2026 10:55
vatsrahul1001
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
pierrejeambrun,
rawwar and
shubhamraj-git
as code owners
September 11, 2026 10:55
vatsrahul1001
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HTTPBearerandOAuth2PasswordBearerboth extract the sameAuthorization: Bearerheader, so declaring both as dependencies produces the same stringtwice.
get_userhad a dead branch for the OAuth2 side (the bearer branchabove it always matched first), and
collect_request_tokensdeduped theduplicate anyway.
Keep
oauth2_schemedeclared as an unused parameter so the OpenAPI securityspec is unchanged and
/docsstill renders the OAuth2 password login form.Only the runtime dead code goes.
(cherry picked from commit 677b4ab)
Co-authored-by: Pierre Jeambrun [email protected]