Feature request: ssoAutoRedirect option (auto-redirect login page to /sso/login while keeping local-login fallback)
Summary
Add an ssoAutoRedirect admin setting that causes the login page (/) to immediately redirect to /sso/login when SSO is configured, instead of showing the login form with the OpenID Connect button that the user must click manually.
Local login must remain accessible via a fallback URL (e.g. /?local=1 or /login?local=1) so the maintainer's important objection on #1927 — "local login access is mandatory to have when SSO is enabled... in case of scenarios when its impossible to login with SSO due to DNS issues" — is preserved.
Why this is different from #1927
#1927 asked to hide / disable the local-login form when SSO is on. That was rightly declined because it would lock the admin out when SSO fails (DNS-down, IdP outage, expired client secret).
This request keeps the local-login form fully available — it just isn't the default landing experience when SSO is configured. The user gets one-click SSO on the happy path; the local-login form remains one URL parameter away on the unhappy path.
Proposed UX
| Config | Hitting / does |
Local-login fallback |
|---|---|---|
| SSO off (today) | Shows local-login form | (n/a) |
SSO on, ssoAutoRedirect=false (today's behavior) |
Shows local-login form with OIDC button | Already shown |
SSO on, ssoAutoRedirect=true (new) |
302 / JS-redirect to /sso/login |
/?local=1 (or similar) shows the form |
Proposed API surface
POST /api/admin/sso/set gains:
ssoAutoRedirect=true|false (default: false, matches today's behavior)
GET /api/admin/sso/get returns the same field. GET / checks the flag + the absence of ?local=1 and either renders the login page or emits a redirect to /sso/login.
Why this matters
When Technitium is one of many SSO-protected internal apps in a homelab or small-business setup, every other app (Authentik applications, Vaultwarden, Gitea, Paperless, etc.) takes the user straight to the SSO flow. Technitium's mandatory extra click stands out as friction. Users with muscle-memory across a dozen SSO-protected services have to think about Technitium specifically.
For setups behind a reverse-proxy outpost (Authentik forward-auth outpost is the common pattern), the user is already authenticated to the identity provider by the time they reach Technitium — but still has to click "OpenID Connect" inside Technitium's login UI to do a second handshake. Auto-redirect collapses that to invisible.
Current workaround
A one-line JS patch to www/js/main.js after $("#divLoginSso").show(); that fires window.location="sso/login". Works, but doesn't survive Technitium upgrades — they replace www/ wholesale, so the patch needs a re-apply hook (systemd timer or post-upgrade script). A native admin setting would eliminate this brittleness for everyone hitting the same use case.
Acceptance
- New admin setting in the SSO config UI (checkbox: "Auto-redirect to SSO on login page").
- API parity:
ssoAutoRedirectfield on the get/set endpoints. - Local-login fallback URL documented in the help text under the setting (e.g. "Local login still accessible at
/?local=1"). - Persisted across restarts (in
auth.config).
Thanks for the request. In a bid to save one click for SSO users, this makes it extremely hard for users with local accounts. The local account access is something that wont be available directly and will requires user to know what to enter in the URL. This will end up with support tickets as people will forget the way to access the local accounts.
Many apps which take directly to SSO do so because they are configured with reverse proxy with SSO support and its the reverse proxy that does that, not the app itself.
Thanks for the clarification and for explaining the reasoning behind the decision.
I understand the argument that local login should always remain available as a recovery mechanism when SSO is unavailable. I completely agree that removing local login entirely would be risky.
However, I think this concern could be addressed while still providing a better SSO experience. Instead of changing the default behavior for everyone, the feature could simply be an optional setting in the SSO configuration page (disabled by default).
This would preserve the current experience for all existing installations while allowing administrators who primarily use SSO to enable a more streamlined login flow if they want it. The local login page could still remain accessible through a documented fallback URL such as /?local=1, so the recovery path would not be lost.
Since the feature would be opt-in, each administrator could decide whether the convenience of automatic SSO redirection is worth the trade-off in their own environment. Users who rely on local accounts could simply leave the setting disabled and continue using the current behavior.
In many homelab and business environments, the administrator managing the instance is already familiar with the fallback URL and intentionally prefers a direct SSO experience. Making it an opt-in setting would allow each deployment to decide for itself rather than enforcing a single workflow for all users.
I think this strikes a good balance between maintaining the important recovery path and reducing friction for SSO-focused installations.
@tecbeat Thanks for comments. The same argument I made covers having an option to enable it. A lot of people will just enable it and forget how to get it to go for local login access. There is no obvious thing anywhere which will tell them how to get to the login page so they will just send a support email.
I am actively changing things regularly just so as to reduce support emails since they take up huge amount of time which I could have spent on working on the project. There is no support team or something, its just me doing literally everything. So having such an option is something going against what I have been doing.
Typically other products solve this problem by accepting environment variables to override the SSO in case of emergency, i.e. to enable local login and set/override the default admin account password.
yep, it would be perfect to have some .env variable such as DNS_SERVER_ALLOW_LOCAL_LOGIN. Just set it to true, re-create container and can do some maintenance / disaster recovery etc.
Typically other products solve this problem by accepting environment variables to override the SSO in case of emergency, i.e. to enable local login and set/override the default admin account password.
Thanks for the suggestion. This too does not solve the issue I raised above. Any such implementation is going to lead to support emails no matter what. In case of emergency, a good number of people will just send support email instead of taking look at documentation.
Secondly, unlike usual applications, DNS server is a critical service on your network and restarting it since you have to apply an environment variable is going to take down a lot of services on your network.
All this to save just one single click is not really justified.
I think I am looking at this from a different perspective. I am not looking for saving one click, I want to remove the attack vector using the admin username and password in a SSO environment.
I think I am looking at this from a different perspective. I am not looking for saving one click, I want to remove the attack vector using the admin username and password in a SSO environment.
Attacker can directly make login API calls too. Any GUI side redirection is not going to help with that.
To secure your local admin user, you should have a good password along with 2FA enabled.