Skip to content

Hide email field on login page when SSO_ONLY is enabled - #7173

Open
IacopoSb wants to merge 3 commits into
dani-garcia:mainfrom
IacopoSb:feat/sso_login_graphical_fix
Open

Hide email field on login page when SSO_ONLY is enabled#7173
IacopoSb wants to merge 3 commits into
dani-garcia:mainfrom
IacopoSb:feat/sso_login_graphical_fix

Conversation

@IacopoSb

@IacopoSb IacopoSb commented May 1, 2026

Copy link
Copy Markdown

Two new SCSS rules in src/static/templates/scss/vaultwarden.scss.hbs that hide .vw-email-form-field and .vw-remember-email when sso_only=true.

Why

When SSO_ENABLED=true && SSO_ONLY=true the email entered on the login page is ignored by the backend (single-tenant SSO uses FAKE_SSO_IDENTIFIER), but the page still asks for it and forces the user to type something. Hiding the input simplifies the UX to a single "Continue with SSO" button.

How

Following the existing pattern used for .vw-or-text / .vw-other-login (already conditional on sso_only), this PR adds an analogous block for the email form-field and the Remember-email checkbox.

Depends on

The classes .vw-email-form-field and .vw-remember-email are added by a companion patch in vw_web_builds: view PR. Without that patch the new rules simply do not match anything.

@IacopoSb
IacopoSb marked this pull request as draft May 1, 2026 15:53
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.
IacopoSb added a commit to IacopoSb/vw_web_builds that referenced this pull request May 2, 2026
Adds two CSS hooks consumed by vaultwarden's SCSS template:
  - vw-email-form-field on the email <bit-form-field>
  - vw-remember-email on the Remember-email <bit-form-control>
so that vaultwarden can hide both elements when SSO_ONLY=true.

Relaxes handleSsoClick() to tolerate an empty email and proceed to the SSO
redirect anyway, since single-tenant vaultwarden uses FAKE_SSO_IDENTIFIER
server-side and does not require an email to start the flow.

Companion changes on the vaultwarden side add the SCSS rules that consume
these hooks (dani-garcia/vaultwarden#7173).
@IacopoSb
IacopoSb force-pushed the feat/sso_login_graphical_fix branch from b653639 to 96b81f7 Compare May 2, 2026 17:38
@IacopoSb
IacopoSb marked this pull request as ready for review May 2, 2026 17:43
@b2un0

b2un0 commented May 18, 2026

Copy link
Copy Markdown

Can we get that soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants