Skip to content

Fix CSRF token mismatch on user creation#94

Merged
JoshuaAFerguson merged 1 commit into
mainfrom
claude/fix-csrf-token-mismatch-01DSY6DV2T93aGD5i261QLBU
Nov 18, 2025
Merged

Fix CSRF token mismatch on user creation#94
JoshuaAFerguson merged 1 commit into
mainfrom
claude/fix-csrf-token-mismatch-01DSY6DV2T93aGD5i261QLBU

Conversation

@JoshuaAFerguson

Copy link
Copy Markdown
Member

The frontend API client was not sending the X-CSRF-Token header on POST/PUT/DELETE/PATCH requests, causing CSRF validation to fail with 403 "CSRF tokens do not match" errors.

Changes:

  • Add csrfToken variable to store token from responses
  • Capture CSRF token from X-CSRF-Token response header
  • Send CSRF token in X-CSRF-Token header for state-changing requests

The frontend API client was not sending the X-CSRF-Token header on
POST/PUT/DELETE/PATCH requests, causing CSRF validation to fail with
403 "CSRF tokens do not match" errors.

Changes:
- Add csrfToken variable to store token from responses
- Capture CSRF token from X-CSRF-Token response header
- Send CSRF token in X-CSRF-Token header for state-changing requests
@JoshuaAFerguson JoshuaAFerguson merged commit 3566c37 into main Nov 18, 2025
@JoshuaAFerguson JoshuaAFerguson deleted the claude/fix-csrf-token-mismatch-01DSY6DV2T93aGD5i261QLBU branch November 18, 2025 04:50
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