Skip to content

docs: define authentication architecture and library decisions - #2

Merged
rd-code-23 merged 2 commits into
mainfrom
feature/auth
Aug 17, 2026
Merged

rd-code-23 merged 2 commits into
mainfrom
feature/auth

Conversation

@rd-code-23

@rd-code-23 rd-code-23 commented Aug 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • document Google OIDC with PostgreSQL-backed server-side sessions
  • specify an opaque session ID in an HttpOnly cookie and no application JWT for the MVP
  • define server-side authentication, authorization, logout, cookie, and CSRF requirements
  • add ADR 0001 selecting the maintained authentication libraries
  • record alternatives, consequences, and deployment-dependent follow-up decisions

Authentication library decision

  • openid-client for Google OIDC
  • express-session for session lifecycle and cookie handling
  • connect-pg-simple for PostgreSQL session persistence
  • csrf-sync for synchronizer-token CSRF protection
  • reuse the existing pg pool
  • do not add Passport or retain Google provider tokens for the MVP

Why

GoForLift has one browser client, one Express API, and PostgreSQL. This stack keeps protocol handling and session behavior in maintained libraries while preserving straightforward logout and revocation without adding Redis, Passport, or application JWT complexity.

Validation

  • pnpm prettier --check docs/architecture.md docs/decisions/0001-authentication-libraries.md — passed
  • git diff --check — passed
  • pnpm format:check — currently reports a pre-existing formatting issue in .github/workflows/ci.yml, which this PR does not modify

Closes #3

@rd-code-23 rd-code-23 changed the title docs: define authentication architecture docs: define authentication architecture and library decisions Aug 17, 2026
@rd-code-23
rd-code-23 merged commit 6493c00 into main Aug 17, 2026
1 check 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.

[Auth][Phase 1] Select and document authentication libraries

1 participant