Title: TOKEN_SECRET default path uses os.homedir(), unwritable on Android / embedded runtimes · Issue #521 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: TOKEN_SECRET default path uses os.homedir(), unwritable on Android / embedded runtimes · Issue #521 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: TOKEN_SECRET default path uses os.homedir(), unwritable on Android / embedded runtimes · Issue #521 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary src/auth/token-secret.js:14 defaults the persisted-secret location to the OS home dir: export const DEFAULT_SECRET_PATH = path.join(os.homedir(), '.jss', 'token.secret'); On Android (nodejs-mobile) os.homedir() resolves to /data ...
Open Graph Description: Summary src/auth/token-secret.js:14 defaults the persisted-secret location to the OS home dir: export const DEFAULT_SECRET_PATH = path.join(os.homedir(), '.jss', 'token.secret'); On Android (nodejs...
X Description: Summary src/auth/token-secret.js:14 defaults the persisted-secret location to the OS home dir: export const DEFAULT_SECRET_PATH = path.join(os.homedir(), '.jss', 'token.secret'); On...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/521
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TOKEN_SECRET default path uses os.homedir(), unwritable on Android / embedded runtimes","articleBody":"## Summary\n\n`src/auth/token-secret.js:14` defaults the persisted-secret location to the OS home dir:\n\n```js\nexport const DEFAULT_SECRET_PATH = path.join(os.homedir(), '.jss', 'token.secret');\n```\n\nOn Android (nodejs-mobile) `os.homedir()` resolves to `/data` (or `/`), which the app process can't write to. `readOrWritePersistedSecret()` then fails the `mkdirSync` with EACCES:\n\n```\nWARNING: Could not persist TOKEN_SECRET (EACCES: permission denied, mkdir '/data/.jss'). Using ephemeral secret; tokens will not survive restarts.\n```\n\nResult: every restart rotates the secret, so sessions/tokens don't survive an app restart.\n\n## Impact\n\nDegraded (ephemeral-secret) auth on any runtime where `os.homedir()` isn't writable — embedded Node, some containers, locked-down deploys.\n\n## Inconsistent with configPath\n\n`src/config.js:139` already uses a **cwd-relative** config dir (`configPath: './.jss'`). The token secret is the odd one out, anchoring to `os.homedir()` instead of the same base.\n\n## Suggested fix\n\nAnchor the default secret path to the same base as the rest of JSS config (cwd-relative `./.jss`, or a root/config-dir-derived path) rather than `os.homedir()`. `TOKEN_SECRET` env and the `secretPath` param already exist as overrides — this is only about a writable, consistent default.\n\n## Location\n\n- `src/auth/token-secret.js:14` (and `resolveTokenSecret` / `readOrWritePersistedSecret` below it)","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-23T19:17:51Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/521"}
| 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:14ea6ad0-1377-15d1-1446-d44ced4bd102 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3AC:1E05DF:9149A8:C09129:6B039EFD |
| html-safe-nonce | e28bfda21c8fc3099909a252b558e790c3103c295b374d2fe908271ddb0b6641 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0FDOjFFMDVERjo5MTQ5QTg6QzA5MTI5OjZCMDM5RUZEIiwidmlzaXRvcl9pZCI6IjMxOTgyNTI2ODE1NzE1NzM1MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b96ddfc6d4c8b4cf603ad64d761bc5ed6f9732b099591242ebaa6cdbc4ef0cc6 |
| hovercard-subject-tag | issue:4509349006 |
| 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/521/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2bd481b068b49c86e0e9241ec73969ba029a518238a6e12679eef4075a6783fe/JavaScriptSolidServer/JavaScriptSolidServer/issues/521 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2bd481b068b49c86e0e9241ec73969ba029a518238a6e12679eef4075a6783fe/JavaScriptSolidServer/JavaScriptSolidServer/issues/521 |
| og:image:alt | Summary src/auth/token-secret.js:14 defaults the persisted-secret location to the OS home dir: export const DEFAULT_SECRET_PATH = path.join(os.homedir(), '.jss', 'token.secret'); On Android (nodejs... |
| 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