Skip to content

Add logout button to docs page - #25

Merged
dcruzeneil2 merged 1 commit into
mainfrom
hypeship/add-docs-logout
Aug 3, 2026
Merged

Add logout button to docs page#25
dcruzeneil2 merged 1 commit into
mainfrom
hypeship/add-docs-logout

Conversation

@dcruzeneil2

@dcruzeneil2 dcruzeneil2 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

summary

  • add a logout button beside the signed-in account details on /docs
  • revoke the active database session and clear the browser session cookie
  • reject cross-site logout requests and cover the UI and route behavior with tests

testing

  • npx tsc --noEmit
  • npm test
  • npm run build
  • npm run spec:check

Note

Medium Risk
Touches session revocation and cookie handling, but uses existing origin CSRF checks and is covered by focused route and UI tests.

Overview
Signed-in users on /docs get a log out control next to the account line (POST form to /logout), with light flex styling on the session header row.

POST /logout enforces originOk CSRF checks, revokes the active sessions row when a valid jh_sess token is present, always clears the session cookie via new clearSessionCookieHeader(), and redirects to /login. Vitest covers the route (revoke, stale cookie, cross-site 403) and the docs HTML includes the logout form.

Reviewed by Cursor Bugbot for commit 5438dfd. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
justhtml Ready Ready Preview Aug 3, 2026 7:38pm

@dcruzeneil2
dcruzeneil2 marked this pull request as ready for review August 3, 2026 19:38
@dcruzeneil2
dcruzeneil2 requested a review from rgarcia August 3, 2026 19:39
@dcruzeneil2
dcruzeneil2 merged commit 92d0b12 into main Aug 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants