Title: IdP login form re-renders silently on failed authentication — error not shown to user · Issue #514 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: IdP login form re-renders silently on failed authentication — error not shown to user · Issue #514 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: IdP login form re-renders silently on failed authentication — error not shown to user · Issue #514 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Problem When a user submits the IdP's sign-in form with invalid credentials, handleLogin in src/idp/interactions.js correctly: Sets interaction.lastError = 'Invalid username or password' (line 121) Saves the interaction Redirects back to...
Open Graph Description: Problem When a user submits the IdP's sign-in form with invalid credentials, handleLogin in src/idp/interactions.js correctly: Sets interaction.lastError = 'Invalid username or password' (line 121)...
X Description: Problem When a user submits the IdP's sign-in form with invalid credentials, handleLogin in src/idp/interactions.js correctly: Sets interaction.lastError = 'Invalid username or password'...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/514
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IdP login form re-renders silently on failed authentication — error not shown to user","articleBody":"## Problem\n\nWhen a user submits the IdP's sign-in form with invalid credentials, `handleLogin` in `src/idp/interactions.js` correctly:\n\n1. Sets `interaction.lastError = 'Invalid username or password'` (line 121)\n2. Saves the interaction\n3. Redirects back to `/idp/interaction/\u003cuid>`\n\nThe GET handler then re-renders `loginPage(uid, params.client_id, interaction.lastError)` — passing `lastError` as the third argument. The error message **never appears in the rendered HTML**. The page looks identical to the initial sign-in form. User has no idea what went wrong.\n\n## Symptom from the user's perspective\n\n- Click Sign In with wrong password\n- Page flickers / \"reloads\"\n- Same Sign In form appears\n- No red banner, no \"Invalid username or password\" text, nothing\n- User assumes the form is broken, retries identically, fails again\n\n## Where the rendering gap lives\n\n`loginPage()` in `src/idp/views.js` accepts `lastError` (third positional arg per `interactions.js:30`) but apparently doesn't render it. Likely a missing template literal — the function probably accepted the parameter at some point but the HTML output never received the `\\${lastError}` interpolation.\n\nQuick check needed: grep `lastError` in `src/idp/views.js`. If absent or referenced but not in the output HTML, that's the gap.\n\n## Repro\n\n```\njss start --port 5446 --single-user --single-user-password correct --idp \\\n --root /tmp/jss-test/pod-data\n```\n\nVisit any path that triggers the IdP, e.g. `http://localhost:5446/idp/auth?...`, then submit `Username: me, Password: wrong`. Expected: visible error. Actual: silent re-render.\n\n## Why it matters\n\nThis is a credibility cliff. The OIDC handshake is most users' *first* contact with the server; if the login form silently fails, users assume the system is broken — not that they typed the wrong password. I wasted hours debugging an imagined OIDC regression here (now closed as #513) when the actual cause was a password mismatch that the IdP simply refused to surface.\n\n## Suggested fix\n\nIn `src/idp/views.js`'s `loginPage()`, render `lastError` near the top of the form if truthy:\n\n```js\n${lastError ? `\u003cdiv class=\"auth-error\" role=\"alert\">${escapeHtml(lastError)}\u003c/div>` : ''}\n```\n\nStyle with red text on a faint pink background, accessible via `role=\"alert\"` so screen readers announce it.\n\n## Related\n\n- #513 (closed) — the OIDC-regression rabbit hole this UX bug sent me down\n- Same pattern likely applies to consent / register flows — worth a sweep through every page that accepts a `lastError` parameter","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-20T05:31:33Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/514"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5a241c8b-57cd-29c1-e3e1-a7d3c1475370 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDF0:17DCE6:2B1F951:39104EA:6B0398D2 |
| html-safe-nonce | 0c113ba937a577c1e7be5a57b4e343e6c2517e400fad9aebef32c58fffc536c4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREYwOjE3RENFNjoyQjFGOTUxOjM5MTA0RUE6NkIwMzk4RDIiLCJ2aXNpdG9yX2lkIjoiMjIzNDU2NDQyMDk1OTQ0MzE1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7dc42b02472079d2a16872f66a55b5783a63f41aea2727e5aac1dcad13c57c59 |
| hovercard-subject-tag | issue:4483450584 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/514/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c571f8926e1bfa5708001538e977f7105f5427ccc561d3179be8eb0135c728d8/JavaScriptSolidServer/JavaScriptSolidServer/issues/514 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c571f8926e1bfa5708001538e977f7105f5427ccc561d3179be8eb0135c728d8/JavaScriptSolidServer/JavaScriptSolidServer/issues/514 |
| og:image:alt | Problem When a user submits the IdP's sign-in form with invalid credentials, handleLogin in src/idp/interactions.js correctly: Sets interaction.lastError = 'Invalid username or password' (line 121)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width