Skip to content

fix: Add Zod input validation for authentication endpoints#1093

Open
sonusharma6-dsa wants to merge 1 commit into
Charushi06:mainfrom
sonusharma6-dsa:feature/zod-validation
Open

fix: Add Zod input validation for authentication endpoints#1093
sonusharma6-dsa wants to merge 1 commit into
Charushi06:mainfrom
sonusharma6-dsa:feature/zod-validation

Conversation

@sonusharma6-dsa
Copy link
Copy Markdown

Resolves #1090

Description

Introduced zod schema parsing to the /api/auth/login and /api/auth/signup endpoints. This ensures that incoming payloads are strictly validated (correct email formats, strong password criteria) before any backend logic is executed, improving security and preventing malformed data.

  • Verified logic locally
  • Catch block correctly captures ZodErrors and returns clean 400 responses

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.

[Bug]: Add Zod Input Validation for Backend API

1 participant