Skip to content

CSRF Protection for Cookie-Based Auth (If Cookies Enabled) #174

@ahmadogo

Description

@ahmadogo

Description:

Add CSRF protection when using httpOnly cookies for access/refresh tokens.

Tasks:

  • Enable double-submit cookie or CSRF token header approach
  • Provide CSRF token via GET /auth/csrf (if needed)
  • Validate CSRF token for state-changing requests
  • Update docs/README for frontend integration steps

Acceptance Criteria:

  • State-changing requests without valid CSRF token fail with 403
  • CSRF token lifecycle documented and test-covered
  • Works seamlessly with current auth flows
  • Screenshot of server Up and Running

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions