Login, logout, and session guard #14
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Server-side sessions with HttpOnly cookies are the only browser auth mechanism (ADR 0007).
Scope
Endpoints:
POST /auth/login(username-or-email + password; verifies Argon2id; creates session row; sets opaqueHttpOnly; Secure; SameSite=Laxcookie; sliding 30-day expiry),POST /auth/logout(deletes session),GET /auth/me(current user profile). Implement the globalAuthGuard(attaches user to request; routes opt out via@Public()), login rate limiting (10/min/IP) and per-account backoff on repeated failures. CSRF: enforce Origin/Referer check on mutating requests.Acceptance criteria
/auth/mereturns the profile; logout invalidates immediately (subsequent request 401)Technical notes
expires_atat most once per hour to avoid write storms.Dependencies
Depends on #10, #11.
Size: ~1.5 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.