Skip to content

Conversation

waldekmastykarz
Copy link
Collaborator

Fixes Initializing AuthPlugin. Closes #1371

@waldekmastykarz waldekmastykarz added the pr-bugfix Fixes a bug label Aug 26, 2025
@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 06:28
@waldekmastykarz waldekmastykarz requested a review from a team as a code owner August 26, 2025 06:28
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the AuthPlugin initialization where the plugin was being disabled at the end of the initialization method regardless of whether initialization succeeded or failed. The fix moves the Enabled = false assignment to the beginning of initialization and sets Enabled = true only after successful initialization.

  • Moves the plugin disabling to the start of initialization to support early exits on configuration errors
  • Enables the plugin only after successful initialization is complete

@waldekmastykarz waldekmastykarz merged commit 80126c4 into dotnet:main Aug 26, 2025
4 checks passed
@waldekmastykarz waldekmastykarz deleted the fix-auth-enabled branch August 26, 2025 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: AuthPlugin's Enabled is always false in the InitializeAsync
1 participant