Skip to content

feat: #1007 - Option to disable local login when OIDC is enabled - #1020

Open
DerDummePunkt wants to merge 1 commit into
gotify:masterfrom
DerDummePunkt:github_1007_option_to_disable_local_login_when_oidc_enabled
Open

feat: #1007 - Option to disable local login when OIDC is enabled #1020
DerDummePunkt wants to merge 1 commit into
gotify:masterfrom
DerDummePunkt:github_1007_option_to_disable_local_login_when_oidc_enabled

Conversation

@DerDummePunkt

Copy link
Copy Markdown

This PR attempts to implement #1007

Adds configurable local authentication through GOTIFY_LOCALAUTH_ENABLED, defaults to true to preserve existing behavior.

When local authentication is disabled:

  • The server does not register POST /auth/local/login.
  • Basic Auth with local Gotify user credentials is rejected by authentication middleware.
  • The check for a local admin account and subsequent creation is skipped.
  • The UI hides the local username/password login form, registration button, and password-based elevation form.
  • The UI receives the public localauth flag through injected window.config.
  • GET /gotifyinfo exposes the same flag as localauth.

The server exits with a fatal error when both local authentication and OIDC are disabled, preventing startup without an available login method.

disable local login when OIDC is enabled

- Add GOTIFY_LOCALAUTH_ENABLED, defaulting to true
- Block local login and Basic Auth when disabled
- Expose local auth state to the UI and hide local login flows
- Skip default local admin creation when local auth is disabled
- Require either local auth or OIDC at startup
@DerDummePunkt
DerDummePunkt requested a review from a team as a code owner August 4, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant