Skip to content

fix: style ExternalOidc login button on identity-server pages#1325

Open
sinadarbouy wants to merge 1 commit into
Squidex:masterfrom
sinadarbouy:fix/style-ExternalOidc-login-button-on-identity-server-pages
Open

fix: style ExternalOidc login button on identity-server pages#1325
sinadarbouy wants to merge 1 commit into
Squidex:masterfrom
sinadarbouy:fix/style-ExternalOidc-login-button-on-identity-server-pages

Conversation

@sinadarbouy

@sinadarbouy sinadarbouy commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes unstyled external OIDC login buttons on identity-server pages (/identity-server/account/login/ and profile external-login links).

When identity.oidc* is configured, Squidex registers the authentication scheme as ExternalOidc. The Razor views derive CSS classes from the scheme name (ExternalOidcbtn-externaloidc, icon-externaloidc), but the theme only defined variants for GitHub, Google, Microsoft, and Twitter.

This PR adds the missing button variant, color variable, and icon alias so generic OIDC providers render consistently with other external login buttons.

Before / After

Before

Unstyled plain text — no background color, no icon:
Screenshot 2026-06-10 at 16 23 19
Screenshot 2026-06-10 at 16 26 27

After

Styled button with icon, visually distinct from GitHub/Google/Microsoft:
Screenshot 2026-06-10 at 16 22 00
Screenshot 2026-06-10 at 16 20 42

Root cause

Login.cshtml and Profile.cshtml use:

var schema = provider.AuthenticationScheme.ToLowerInvariant();
<button class="btn external-button btn-block btn btn-@schema" ...>
  <i class="icon-@schema external-icon"></i>

The OIDC scheme name is ExternalOidc (Squidex.Web.Constants.ExternalScheme), but _bootstrap.scss had no btn-externaloidc rule and icomoon had no icon-externaloidc.

Color choice

Generic OIDC is intentionally not styled as a specific IdP brand (Auth0, Azure AD, Okta, etc.). The slate blue-gray (#526484) reads as neutral enterprise SSO and stays visually distinct from:

  • GitHub (#353535)
  • Google (#d34836)
  • Microsoft (#004185)
  • Squidex primary actions (#3389ff)

How to test

  1. Configure external OIDC in appsettings.json or env vars (identity.oidcClient, identity.oidcSecret, identity.oidcAuthority, etc.).
  2. Optionally enable a second external provider (e.g. GitHub) to compare styling side by side.
  3. Set identity.allowPasswordAuth: true or identity.allowCustomDomains: true so the login page is shown instead of auto-redirecting when only one provider is configured.
  4. Open /identity-server/account/login/ and verify the OIDC button has background color and icon.
  5. Open the theme preview page and verify the OIDC sample button in _theme.html.

Checklist

  • Frontend-only change (SCSS + icon CSS + theme preview)
  • No breaking changes
  • Follows existing pattern used for GitHub/Google/Microsoft/Twitter buttons

* Introduced a new button for OIDC authentication in _theme.html.
* Added corresponding styles for the OIDC button in _bootstrap.scss.
* Defined a new color variable for OIDC in _vars.scss.
* Updated icon styles in style.css to include OIDC icon.
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.

1 participant