Title: Add HTTP endpoint for end users to change their own password · Issue #351 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Add HTTP endpoint for end users to change their own password · Issue #351 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Add HTTP endpoint for end users to change their own password · Issue #351 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary A logged-in user has no way to change their own password through the running JSS. The only password-management interface today is the jss passwd
Open Graph Description: Summary A logged-in user has no way to change their own password through the running JSS. The only password-management interface today is the jss passwd
X Description: Summary A logged-in user has no way to change their own password through the running JSS. The only password-management interface today is the jss passwd <user> CLI (#232), which requires shel...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/351
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add HTTP endpoint for end users to change their own password","articleBody":"## Summary\n\nA logged-in user has no way to change their own password through the running JSS. The only password-management interface today is the `jss passwd \u003cuser>` CLI (#232), which requires shell access on the server. End users in a multi-user pod or anyone running JSS without local shell access (containers, managed hosts, etc.) is stuck.\n\n## Current state\n\n- **CLI:** `jss passwd \u003cuser>` — operator-only, shell required.\n- **HTTP IDP:**\n - `POST /idp/credentials` — login only (issues token).\n - No change-password / password-reset endpoint.\n- Account records carry `passwordHash` (bcrypt) so the data layer already supports a rotation, just no API.\n\n## Proposed shape\n\nA single authenticated endpoint, owner-only (the caller's WebID must match the account's WebID), gated by re-supplying the current password as proof:\n\n```\nPUT /idp/credentials\nAuthorization: \u003cexisting session / DPoP>\nContent-Type: application/json\n\n{\n \"currentPassword\": \"...\",\n \"newPassword\": \"...\"\n}\n```\n\n- 200 + new bcrypt hash written, all *other* sessions invalidated, current session re-issued.\n- 401 if current password is wrong.\n- 401 if not authenticated.\n- 403 if the authenticated WebID doesn't match the target account.\n\n(Path bikeshed: `PUT /idp/credentials` matches the existing `POST /idp/credentials` shape; alternatives are `POST /idp/account/password` or `PATCH /idp/credentials`. Not load-bearing — pick whatever lands cleanly with the existing IDP routes.)\n\n## Out of scope\n\n- **Password recovery / forgot-password flow** (no current password). That's a separate feature that needs an email channel + token store. File as a follow-up if/when there's a recovery story.\n- **WebAuthn / passkey rotation** (separate auth mechanism, tracked in #78).\n\n## Acceptance\n\n- New endpoint accepts a valid `{currentPassword, newPassword}` from the authenticated owner and rotates the hash.\n- Wrong `currentPassword` → 401, hash unchanged.\n- Cross-account write attempts (authenticated as A, targeting B's password) → 403.\n- Any other active sessions for the rotated account are invalidated (refresh tokens revoked, etc.).\n- Existing `jss passwd \u003cuser>` CLI continues to work unchanged.\n- Tests cover happy path + the three failure modes above + session-invalidation behavior.\n","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-02T21:08:15Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/351"}
| 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:229822c1-5e3a-c18c-6f59-9674d064ab54 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8EAC:39680A:922930:BA5816:6B03A2B6 |
| html-safe-nonce | 5a4075248572fcb7d2b58a043d609fc3f84b93c9c3f1e929beddbd895a5717c2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUFDOjM5NjgwQTo5MjI5MzA6QkE1ODE2OjZCMDNBMkI2IiwidmlzaXRvcl9pZCI6IjMxNjUxODI1NjcyNjM3NDA1OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | df0c452e14bee5161c67c12817a8fff543daabd7300692b3075f8063a3970f73 |
| hovercard-subject-tag | issue:4370030061 |
| 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/351/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe8bb987ca155d5dfbdf6830190db8b557d16609fa69d2f5e780b38122e8a513/JavaScriptSolidServer/JavaScriptSolidServer/issues/351 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe8bb987ca155d5dfbdf6830190db8b557d16609fa69d2f5e780b38122e8a513/JavaScriptSolidServer/JavaScriptSolidServer/issues/351 |
| og:image:alt | Summary A logged-in user has no way to change their own password through the running JSS. The only password-management interface today is the jss passwd |
| 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