feat: auto-redirect to OIDC provider for true SSO
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m51s
CI / docker (push) Successful in 2m37s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 54s

When OIDC is configured, the login page automatically redirects to the
provider with prompt=none. If the user has an active OIDC session, they
are signed in without seeing a login page. If the provider returns
login_required (no session), falls back to the login form via ?local.
Users can bypass auto-redirect with /login?local.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-06 01:20:55 +02:00
parent 4244dd82e9
commit 3cea306e17
2 changed files with 26 additions and 2 deletions

View File

@@ -18,6 +18,11 @@ export function OidcCallback() {
const errorParam = params.get('error');
if (errorParam) {
// prompt=none SSO attempt failed (no active session) — fall back to login form
if (errorParam === 'login_required' || errorParam === 'interaction_required') {
window.location.replace(`${config.basePath}login?local`);
return;
}
useAuthStore.setState({
error: params.get('error_description') || errorParam,
loading: false,