Skip to content

feat: added oauth protocol support and mcp server APIs - #587

Merged
petruki merged 2 commits into
masterfrom
staging
Oct 4, 2026
Merged

petruki merged 2 commits into
masterfrom
staging

Conversation

@petruki

@petruki petruki commented Oct 4, 2026

Copy link
Copy Markdown
Member

This pull request introduces comprehensive support for OAuth 2.0 dynamic client registration and authorization flows in the Switcher API, including new endpoints, models, authentication middleware, and documentation updates. It also adds the SWITCHER_MANAGEMENT_URL environment variable to support browser-based consent screens, and upgrades the SonarCloud GitHub Action.

The most important changes are:

OAuth 2.0 Support

  • Added new models for OAuthClient and OAuthAuthorizationCode to manage OAuth clients and authorization codes in the database. [1] [2]
  • Implemented OAuth endpoints and schemas (/oauth/register, /oauth/authorize, /oauth/token, and well-known endpoints), with OpenAPI documentation and schema definitions. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated authentication middleware to support both session JWTs and OAuth access tokens, with a new authAny strategy for dual compatibility on specific routes. [1] [2] [3]

Environment and Configuration

  • Added the SWITCHER_MANAGEMENT_URL environment variable to .env-cmdrc-template and .env.dev to configure the consent screen location for OAuth clients. [1] [2] [3]
  • Updated the README.md to document dynamic OAuth client consent screen behavior and the use of SWITCHER_MANAGEMENT_URL.

CI/CD

  • Upgraded the SonarCloud scan GitHub Action from v8.2.1 to v8.3.0 for both master.yml and sonar.yml. [1] [2]

@petruki petruki added this to the v1.4.1 milestone Oct 4, 2026
@petruki petruki self-assigned this Oct 4, 2026
@petruki petruki added enhancement New feature or request ai-generated Indicates that AI tools were used to generate this change labels Oct 4, 2026
Comment thread src/routers/config.js Fixed
Comment thread src/routers/oauth.js Fixed
Comment thread src/services/config.js Fixed
Comment thread src/services/config.js Fixed
Comment thread src/services/oauth.js Fixed
Comment thread src/services/oauth.js Fixed
Comment thread src/services/oauth.js Fixed
@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@petruki
petruki merged commit e913541 into master Oct 4, 2026
5 checks passed
@petruki
petruki deleted the staging branch October 4, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Indicates that AI tools were used to generate this change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants