Repository navigation
Feature Request: Conditional Local Login for LAN Fallback When Using OAuth / OIDC[Feature] feature-name-goes-here #26713
Closed
Jethro-T
started this conversation in
Feature Request
Replies: 2 comments 3 replies
Are you aware of the admin commands to enable password login? https://docs.immich.app/administration/server-commands |
2 replies
|
Having the Immich server conditionally enable features based on where a client is connecting from seems kind of messy. I would suggest that you enable the OAuth auto launch for the seamless SSO, and then block the normal login endpoint at the reverse proxy level for connections originating from outside the LAN. I think that should cover the core of what you're looking for, right? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have searched the existing feature requests, both open and closed, to make sure this is not a duplicate request.
The feature
Feature Request: Conditional Local Login for LAN Fallback When Using OAuth / OIDC
Summary
Immich currently supports two authentication methods: local email/password login and OAuth/OIDC. When OAuth is enabled and local login is disabled, Immich becomes fully dependent on the identity provider. This creates a risk of complete lockout if the IdP becomes unavailable. When local login is enabled, both login options are always visible, including in the mobile app, which breaks the clean SSO experience.
A conditional fallback mechanism would allow seamless SSO for normal use while still providing a safe, LAN‑only emergency login path.
Problem
When using OAuth/OIDC (e.g., Authentik, Keycloak, etc.), Immich behaves in one of two ways:
Local login enabled:
Local login disabled:
This forces administrators to choose between:
There is currently no way to allow local login only from trusted networks (e.g., LAN) while keeping OAuth as the default for all other users.
Proposed Solution
Introduce a conditional local login mechanism with the following capabilities:
1. IP‑based access control for local login
Allow administrators to define CIDR ranges (e.g.,
192.168.0.0/16,10.0.0.0/8) from which local login is permitted.2. Auto‑redirect to OAuth for all non‑LAN clients
If a client is not in the allowed IP ranges:
3. Fallback behavior when OAuth provider is unreachable
If the OAuth provider cannot be reached:
4. Optional: Dedicated fallback admin user
A single local admin account that:
Benefits
This feature would provide:
Why this fits Immich’s architecture
Immich already:
Adding conditional logic based on IP ranges is a natural extension and does not break existing flows.
Conclusion
A conditional local login mechanism would significantly improve Immich’s reliability and security in OAuth‑enabled setups. It provides the best of both worlds: clean SSO for normal use and a safe fallback for administrators, without exposing local login externally.
Platform
All reactions