Skip to content

Conversation

@hrntknr
Copy link
Member

@hrntknr hrntknr commented Aug 28, 2025

Summary

Adds a --no-provider-auto-select flag that disables automatic redirect to the sole configured provider when no password is set. This gives operators the option to always land on the login chooser page even if only one provider is configured.

  • AuthRouter: new noProviderAutoSelect field respected in handleLogin.
  • mcp-proxy: thread flag into Run and auth.NewAuthRouter.
  • Tests updated to cover both behaviors.
  • Docs updated to document the new flag.

Type of Change

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to our CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

Related Issues

Copilot AI review requested due to automatic review settings August 28, 2025 14:53

This comment was marked as outdated.

@hrntknr hrntknr force-pushed the feat/no-provider-auto-select branch 2 times, most recently from cd02a3f to fc427c4 Compare August 28, 2025 15:01
- Add noProviderAutoSelect to AuthRouter and mcp-proxy Run
- Skip auto-redirect to the sole provider when no password is set
- Update docs and tests to cover behavior

Notes: This adds a new parameter to exported constructors; call sites pass the flag.
@hrntknr hrntknr force-pushed the feat/no-provider-auto-select branch from fc427c4 to e5f1f29 Compare August 28, 2025 15:02
@hrntknr hrntknr requested a review from Copilot August 28, 2025 15:04
@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
main.go 0.00% 3 Missing ⚠️
pkg/mcp-proxy/main.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

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 adds a new --no-provider-auto-select flag that gives operators control over authentication flow behavior by disabling automatic redirects to the sole configured OAuth/OIDC provider when no password is set.

  • Added noProviderAutoSelect parameter throughout the authentication system
  • Updated auto-redirect logic to respect the new flag setting
  • Added comprehensive test coverage for different authentication scenarios

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
main.go Added CLI flag definition and environment variable support for the new option
pkg/mcp-proxy/main.go Threaded the new parameter through the Run function to auth router creation
pkg/auth/auth.go Added noProviderAutoSelect field and implemented conditional auto-redirect logic
pkg/auth/auth_test.go Added comprehensive tests covering auto-redirect behavior under different configurations
pkg/idp/idp_test.go Updated test setup to pass the new parameter to maintain compatibility
docs/docs/configuration.md Added documentation for the new configuration option
Comments suppressed due to low confidence (1)

docs/docs/configuration.md:1

  • The table header separator line has inconsistent column count and alignment compared to the updated table structure. It should match the four-column format with proper alignment.
---

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@hrntknr hrntknr merged commit 128e1cc into sigbit:main Aug 28, 2025
8 checks passed
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.

1 participant