feat(login): IdP-labelled SSO buttons + subtitle/footer that adapt to available methods#18
Conversation
…lable methods
- SSO button is always labelled with the IdP ("Continue with Google") instead of
a generic "Continue with SSO" for the single-IdP case — reads better and
disambiguates multiple providers. (Label comes from the config `label`, which
falls back to the issuer host, so deployments should set a friendly `label`.)
- The card subtitle and footer tag now reflect which methods are actually
offered: SSO+credentials, SSO-only (`basic_login:false` → no "credentials"
phrase, footer "OAuth"), credentials-only (no idps), or neither. Previously the
copy hard-coded "…or connect with ClickHouse credentials" / "OAuth · credentials"
even when the credentials path was hidden.
login.js stays at 100% coverage; added a suite covering the four method
combinations + the config-load-failure path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
|
Added two more login-screen improvements to this PR (and merged latest Removed the "Sign in" title + subtitle entirely — no value, just took space; the brand block is heading enough. The footer tag still adapts (
README updated; Verified live:
Note: buttons are label-driven, so a config without |
Buttons are label-driven; without an explicit `label` a config showed the
issuer host ("Continue with altinity.auth0.com"). Derive a friendly name:
explicit `label` → Auth0 `authorize_params.connection` (github → "GitHub") →
known issuer host (accounts.google.com → "Google") → issuer host.
This fixes the demo clusters with no server-side change: github.demo
(connection=github) → "Continue with GitHub", antalya (accounts.google.com) →
"Continue with Google" — their `config.json` is inline in CHOP-managed
ConfigMaps, so editing it would risk a pod restart (and github.demo crashes on
restart). Deploying the asset is enough.
oauth-config.js stays at 100%.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef
|
Resolved the "config without a The demo clusters' Instead,
No server-side config change, no restart. |
Follow-ups from the credentials-login work (#16) and the otel SSO-only deploy.
Changes
label, falling back to the issuer host — see note below.)OAuth · credentialsbasic_login:false) → "Use single sign-on for this server." ·OAuth← the bug you spotted on otelidps) → "Connect with your ClickHouse username and password." ·credentials—Note for deployments
Because the button is now label-driven, a config without a
labelshows the issuer host ("Continue with altinity.auth0.com"). Clusters should set a friendlylabelper IdP (e.g. github.demo →"GitHub", antalya →"Google"). otel's config already got"label": "Altinity SSO".Tests
login.jsstays at 100%; new suite covers the four method combinations + the config-load-failure path. Full suite green.Verified
Deployed to otel (SSO-only,
basic_login:false): button "Continue with Altinity SSO", subtitle has no credentials phrase, footer "OAuth", no credentials form; SSO sign-in still works.🤖 Generated with Claude Code
https://claude.ai/code/session_01QennTvGKAtJZrv9EpQagef