fix: hide email field on login page when SSO_ONLY is enabled

When SSO_ENABLED=true and SSO_ONLY=true the email entered on the login
page is ignored by the backend (single-tenant SSO uses FAKE_SSO_IDENTIFIER).
Hide the email form-field and the Remember-email checkbox so the page
shows only the "Continue with SSO" button. Requires the matching
bw_web_builds patch that adds .vw-email-form-field and .vw-remember-email
classes to the login template.
This commit is contained in:
Iacopo Sbalchiero 2026-05-01 15:57:19 +02:00
parent 14258caec9
commit 96b81f7287
No known key found for this signature in database

View file

@ -89,6 +89,16 @@ app-root ng-component > form > div:nth-child(1) > div:nth-child(3) > div:nth-chi
}
{{/if}}
/* When SSO is the only login option, also hide the email input field and the
`Remember email` checkbox: the email is not required to start the SSO flow
in vaultwarden (single-tenant, FAKE_SSO_IDENTIFIER is used server-side). */
{{#if sso_only}}
.vw-email-form-field,
.vw-remember-email {
@extend %vw-hide;
}
{{/if}}
/* Hide Two-Factor menu in Organization settings */
bit-nav-item[route="settings/two-factor"],
a[href$="/settings/two-factor"] {