Skip to content

feat: per-route OAuth2 provider + auth exception rules for all auth m…#1197

Open
BluLupo wants to merge 1 commit into
tobychui:mainfrom
BluLupo:feat/per-route-oauth2-provider
Open

feat: per-route OAuth2 provider + auth exception rules for all auth m…#1197
BluLupo wants to merge 1 commit into
tobychui:mainfrom
BluLupo:feat/per-route-oauth2-provider

Conversation

@BluLupo

@BluLupo BluLupo commented Jun 1, 2026

Copy link
Copy Markdown

…ethods

  • Add OAuth2ProviderConfig struct allowing each proxy route to use its own OAuth2/OIDC provider (different Authentik application, client ID and secret per virtual host)
  • Apply auth exception rules (path prefix / CIDR bypass) to OAuth2, Forward Auth and ZorxAuth — previously only Basic Auth respected them
  • Refactor HandleOAuth2Auth to merge per-route config over global settings with isolated cache keys (no cross-route pollution)
  • Fix missing in basicAuthEditor.html that hid the Add Exception button when Path Prefix mode was selected
  • UI: show per-route OAuth2 config panel when OAuth2 auth method is selected; hide credentials section for non-Basic-Auth methods

Closes #1162

@BluLupo BluLupo requested a review from tobychui as a code owner June 1, 2026 13:24
@tobychui

tobychui commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Hi @kjagosz ,

As I remember you are the original author for this module, would you like to take a look at the changes before I merge this?

…ethods

- Add OAuth2ProviderConfig struct allowing each proxy route to use its
  own OAuth2/OIDC provider (different Authentik application, client ID
  and secret per virtual host)
- Apply auth exception rules (path prefix / CIDR bypass) to OAuth2,
  Forward Auth and ZorxAuth — previously only Basic Auth respected them
- Refactor HandleOAuth2Auth to merge per-route config over global
  settings with isolated cache keys (no cross-route pollution)
- Fix missing </div> in basicAuthEditor.html that hid the Add Exception
  button when Path Prefix mode was selected
- UI: show per-route OAuth2 config panel when OAuth2 auth method is
  selected; hide credentials section for non-Basic-Auth methods

Closes tobychui#1162

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@BluLupo BluLupo force-pushed the feat/per-route-oauth2-provider branch from 4a0574f to 8bc6b60 Compare June 1, 2026 13:40
@BluLupo

BluLupo commented Jun 1, 2026

Copy link
Copy Markdown
Author

The code would need to be reviewed, and some real-world testing would need to be carried out.

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.

[ENHANCEMENTS] Path‑Level OAuth2 Exemptions

3 participants