fix(web): surface SSO login errors to the user#38335
Conversation
The SSO login button at web/app/signin/components/sso-auth.tsx chains
getUser*SSOUrl(...).then(...).finally(...) for all three protocols
(SAML, OIDC, OAuth2). When the network call rejects — e.g. enterprise
SSO endpoint misconfigured, CORS error, server 5xx — the rejection is
silently swallowed by .finally() and the UI just stays in the loading
state with no user feedback.
This change adds a .catch() before each .finally() that emits a
toast.error('error.ssoFailed') so the user knows the login attempt
failed and the button re-enables. A new error.ssoFailed key is added
to web/i18n/en-US/login.json; other locales will be resynced by the
i18n:check workflow.
diff --stat:
web/app/signin/components/sso-auth.tsx | 6 ++++++
web/i18n/en-US/login.json | 2 ++
2 files changed, 8 insertions(+)
Generated via peaks-loop (session 2026-07-02-session-95565c, request
2026-07-02-fix-sso-login-missing-error-handler). Red-line scope was
limited to sso-auth.tsx and one new i18n key.
|
Thanks for the contribution. Before we review this PR, please open an issue first to describe the problem, expected behavior, and proposed approach, then link that issue here. This helps us confirm the scope and align on the fix before moving forward. |
|
@crazywoola Thanks for the guidance. Opened issue #38412 describing the SSO login button silently swallowing 5xx / CORS / network errors, the proposed |
Fixes #38412
The SSO login button at web/app/signin/components/sso-auth.tsx chains getUser*SSOUrl(...).then(...).finally(...) for all three protocols (SAML, OIDC, OAuth2). When the network call rejects — e.g. enterprise SSO endpoint misconfigured, CORS error, server 5xx — the rejection is silently swallowed by .finally() and the UI just stays in the loading state with no user feedback.
This change adds a .catch() before each .finally() that emits a toast.error('error.ssoFailed') so the user knows the login attempt failed and the button re-enables. A new error.ssoFailed key is added to web/i18n/en-US/login.json; other locales will be resynced by the i18n:check workflow.
diff --stat:
web/app/signin/components/sso-auth.tsx | 6 ++++++
web/i18n/en-US/login.json | 2 ++
2 files changed, 8 insertions(+)
Generated via peaks-loop (session 2026-07-02-session-95565c, request 2026-07-02-fix-sso-login-missing-error-handler). Red-line scope was limited to sso-auth.tsx and one new i18n key.
Important
Fixes #<issue number>.Summary
Screenshots
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods