Skip to content

fix(users,config): reject duplicate emails and trust CSRF origins - #73

Merged
anthonyA1214 merged 2 commits into
mainfrom
fix/duplicate-user-email-and-csrf-origins
Nov 27, 2026
Merged

anthonyA1214 merged 2 commits into
mainfrom
fix/duplicate-user-email-and-csrf-origins

Conversation

@anthonyA1214

Copy link
Copy Markdown
Member

Ticket

N/A

Description

User creation now returns a 409 when the email is already taken, using a case-insensitive check that also covers soft-deleted accounts. Base settings now read CSRF_TRUSTED_ORIGINS from the environment, so it needs to be set in every environment before deploying. .env.example is updated to include it, adds http://localhost:3000 to the allowed origins, and changes the default FRONTEND_URL from port 5173 to 3000.

Related Issue

N/A

Type of Change

  • Bug fix
  • New feature
  • Chore
  • Refactor
  • Documentation

Image Change

N/A

- Return 409 from create_user when the email already exists, matching
  case-insensitively and including soft-deleted users
- Read CSRF_TRUSTED_ORIGINS from the environment in base settings
- Add CSRF_TRUSTED_ORIGINS to .env.example, allow port 3000 in the
  CORS example, and point FRONTEND_URL to localhost:3000
@anthonyA1214
anthonyA1214 merged commit 1d7a6dd into main Nov 27, 2026
5 checks passed
@anthonyA1214
anthonyA1214 deleted the fix/duplicate-user-email-and-csrf-origins branch November 27, 2026 09:58
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.

1 participant