Skip to content

Stop using HttpClientHandler.PreAuthenticate #5471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

zivkan
Copy link
Member

@zivkan zivkan commented Oct 23, 2023

Bug

Fixes: NuGet/Home#12961

Regression? Yes Last working version: 6.6

Description

The .NET runtime has a bug when using HttpClientHandler.PreAuthenticate that prevents it from getting new credentials when a time-limited credential expires, and the server starts requiring a new credential. NuGet's credential provider can provide the new credential, but HttpClient won't use it as long as PreAuthenticate is true.

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception: We didn't have a test for the previous behaviour. Since we should re-introduce the functionality, I skipped the existing PreAuthenticate test, rather than deleting it, so it's easy to reactive once we have a new solution.
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@zivkan zivkan requested a review from a team as a code owner October 23, 2023 14:20
Copy link
Contributor

@jeffkl jeffkl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢

@zivkan zivkan merged commit db4909b into dev Oct 26, 2023
@zivkan zivkan deleted the dev-zivkan-revert-PreAuthenticate branch October 26, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP 401 after some time in VS
3 participants