Files
GameList/TASKS.md

1.5 KiB

CoopGameChooser Task List

  • Data model: add username + password hash/salt to Player, enforce unique username, update AppDbContext config and create an EF migration; ensure factory reset seeds stay valid.
  • Cookie pipeline: refactor UsePlayerIdentity into a reader that only trusts existing player cookies; add helper to issue/clear the cookie after login/register while keeping HttpOnly/SameSite/Secure semantics.
  • Auth endpoints: add /api/auth/register, /api/auth/login, /api/auth/logout; registration creates the player, sets the player cookie, and stores display name; login validates password and reissues cookie; logout clears cookie.
  • Endpoint auth guard: replace GetOrCreatePlayer with a GetAuthenticatedPlayer helper that returns 401 when unauthenticated; update all suggest/vote/state endpoints to depend on an authenticated player without creating one implicitly.
  • Frontend UX: add login/register screen shown when /api/me returns 401; on success hide auth pane, preload name, then refresh phase data; include a logout control to clear local state.
  • Docs: update API.md (and SPEC.md) to document new auth flows, required auth for existing endpoints, and cookie token behavior.
  • Ops/migration notes: generate/apply migration, legacy players auto-assigned legacy-xxxxxxxx usernames with blank hashes; expect fresh registration or factory reset; IIS/base-path unaffected.