refactor(auth): post-review tidy — drop @NotNull, refresh e2e comment, use oidc.primary

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-26 19:48:20 +02:00
parent 71688dea16
commit 45b5f473c9
3 changed files with 8 additions and 8 deletions

View File

@@ -52,14 +52,14 @@ export function LoginPage() {
if (isAuthenticated) return <Navigate to="/" replace />;
if (capsLoading) return null;
const oidcEnabled = caps?.oidc?.enabled === true;
const oidcPrimary = caps?.oidc?.primary === true;
const adminRecoveryOnly = caps?.localAccounts?.adminRecoveryOnly === true;
const providerName = caps?.oidc?.providerName || 'Single Sign-On';
// Render decisions
const showSsoPrimary = oidcEnabled && adminRecoveryOnly && !forceLocal;
const showLocalForm = !oidcEnabled || forceLocal || !adminRecoveryOnly || capsFailed;
const showAdminRecoveryBanner = oidcEnabled && adminRecoveryOnly && forceLocal;
const showSsoPrimary = oidcPrimary && adminRecoveryOnly && !forceLocal;
const showLocalForm = !oidcPrimary || forceLocal || !adminRecoveryOnly || capsFailed;
const showAdminRecoveryBanner = oidcPrimary && adminRecoveryOnly && forceLocal;
const handleSubmit = (e: FormEvent) => {
e.preventDefault();