Skip to content

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

Merged
SebastianStehle merged 2 commits into
Squidex:masterfrom
sinadarbouy:fix/style-ExternalOidc-login-button-on-identity-server-pages
Jul 29, 2026
Merged

fix: style ExternalOidc login button on identity-server pages#1325
SebastianStehle merged 2 commits 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.
@SebastianStehle

Copy link
Copy Markdown
Contributor

Sorry, for the late reply. The icons are created with icomoon.io. You need to update the file using this tool. Otherwise it gets overwritten the next time.

.icon-external-link:before {
content: "\e96d";
}
.icon-externaloidc:before {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, for the late reply. The icons are created with icomoon.io. You need to update the file using this tool. Otherwise it gets overwritten the next time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review, fixed in c52e9fa

I imported the existing selection.json, added an externaloidc icon to the set, and committed the regenerated style.css, selection.json, demo.html, font files, and icons/externaloidc.svg.

The icon now has its own glyph at \e906 instead of a hand-edited alias of external-link, so it won’t be overwritten on the next export.

Add a dedicated glyph instead of hand-editing style.css so the icon
survives the next icomoon export.
@SebastianStehle
SebastianStehle merged commit a1f0289 into Squidex:master Jul 29, 2026
8 checks passed
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