Title: Auth-required responses return empty body — browser navigation produces blank page · Issue #461 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Auth-required responses return empty body — browser navigation produces blank page · Issue #461 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Auth-required responses return empty body — browser navigation produces blank page · Issue #461 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Context Solid-OIDC bearer tokens live in IndexedDB. When a browser does a plain navigation to a private resource (clicking a link, typing a URL, opening a bookmark), it doesn't automatically attach the bearer or DPoP headers. JSS receive...
Open Graph Description: Context Solid-OIDC bearer tokens live in IndexedDB. When a browser does a plain navigation to a private resource (clicking a link, typing a URL, opening a bookmark), it doesn't automatically attach...
X Description: Context Solid-OIDC bearer tokens live in IndexedDB. When a browser does a plain navigation to a private resource (clicking a link, typing a URL, opening a bookmark), it doesn't automatically at...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/461
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Auth-required responses return empty body — browser navigation produces blank page","articleBody":"## Context\n\nSolid-OIDC bearer tokens live in IndexedDB. When a browser does a plain navigation to a private resource (clicking a link, typing a URL, opening a bookmark), it doesn't automatically attach the bearer or DPoP headers. JSS receives an unauthenticated request, returns **401 with an empty body**, and the user sees a completely blank page with no indication of what happened or what to do.\n\n## Repro\n\n1. Start any single-user JSS instance (e.g. via [jspod](https://github.com/JavaScriptSolidServer/jspod))\n2. Sign in via the OIDC flow — tokens now live in browser IndexedDB\n3. Visit \\`http://localhost:5444/private/\\` in the address bar (browser nav, no app)\n\nExpected: some indication that this resource requires sign-in / which app to use.\nActual: completely blank page, HTTP 401 with `Content-Length: 0`.\n\n\\`\\`\\`\n$ curl -i http://localhost:5444/private/\nHTTP/1.1 401 Unauthorized\nContent-Length: 0\n...\n\\`\\`\\`\n\nThe same issue affects:\n- Bookmarked private resources\n- Solid app deep-links that send the user to a pod URL before initiating OIDC\n- Welcome-page directory tiles in jspod (which appear lit when signed in because the page-side probe uses session.authFetch, but the click triggers an unauthenticated browser nav)\n\n## What other servers do\n\n[Community Solid Server](https://github.com/CommunitySolidServer/CommunitySolidServer) returns an HTML response on 401 that includes the IdP URL and a \"you need to sign in\" message. [NSS](https://github.com/nodeSolidServer/node-solid-server) renders a server-side HTML page when a private resource is requested unauthenticated. JSS currently is the odd-one-out with an empty 401.\n\n## Proposed fix options\n\n### A. Always return an HTML auth-required page on 401 for `Accept: text/html`\n\nSimplest. When the request accepts HTML and auth is required, return a small server-rendered page:\n\n> 🔒 This resource requires sign-in\n> \n> [Sign in →]\n\nPros: works everywhere a browser navigates. No client-side changes anywhere.\nCons: chooses one auth surface (where does \"Sign in\" go?). Could be configurable.\n\n### B. Honor a `--auth-page \u003curl>` config option\n\nOperator points JSS at any URL — JSS redirects to it on 401 (with the original resource URL as a query param). Downstream wrappers like jspod could point this at their /signin.html.\n\nPros: composable. Each deployment chooses its own auth surface.\nCons: more configuration.\n\n### C. Combine: default to a built-in HTML page, allow override via flag\n\nSensible default for stock JSS deployments, customizable for wrappers.\n\n## Recommendation\n\n**A or C.** Either eliminates blank-401 pages with no downstream change required.\n\n## Related\n\n- [jspod#1](https://github.com/JavaScriptSolidServer/jspod/issues/1) — friction-removal arc; this is the last visible gap in the first-run flow\n- [JavaScriptSolidServer#459](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/459) — separate issue about a downstream-customization hook for the root index.html. Both fall under the same theme: JSS surfaces that should be either rendered helpfully or customizable.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-16T07:37:09Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/461"}
| 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:c5e89a20-6ba6-689a-0d9a-c9a8eb7e0de1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2FE:21BFE4:79BD55:A0D6F9:6B039652 |
| html-safe-nonce | 332dcee46ae2f70df68340f9af170197da829f6bbec2eb645cc4aad979655fec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkZFOjIxQkZFNDo3OUJENTU6QTBENkY5OjZCMDM5NjUyIiwidmlzaXRvcl9pZCI6IjEwODgwMDMwNzE0MjgyMzY4ODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5a813fee36a81f650bc69552815e37ef9dfd700326d709d55b193931b2a455c7 |
| hovercard-subject-tag | issue:4459136524 |
| 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/461/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aeaa5f319420cbbffa8e399c8d2b801262ac660d57d7dcbde87e01481b274a2d/JavaScriptSolidServer/JavaScriptSolidServer/issues/461 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aeaa5f319420cbbffa8e399c8d2b801262ac660d57d7dcbde87e01481b274a2d/JavaScriptSolidServer/JavaScriptSolidServer/issues/461 |
| og:image:alt | Context Solid-OIDC bearer tokens live in IndexedDB. When a browser does a plain navigation to a private resource (clicking a link, typing a URL, opening a bookmark), it doesn't automatically attach... |
| 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