feat: add centralized schema validation for auth APIs#105
Conversation
|
@ash1shkumar is attempting to deploy a commit to the shreemp194-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Thank you for opening this pull request! I will review your changes and assist you soon. |
|
Hi @Shriii19 👋 This PR is ready for review. Kindly review it and add appropriate gssoc, nsoc, and respective level/difficulty labels as I am contributing under GSSoC and NSoC . Thank you! |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
20:01:47.844 Running build in Washington, D.C., USA (East) – iad1 |
|
@ash1shkumar can you fix those building error. |
|
@Shriii19 , The previous Vercel build issues and merge conflicts have been resolved. The schema validation import path was corrected, conflicts were cleaned up, and the project should now build successfully. Kindly recheck the PR when possible. Thank you! |
Summary
This PR introduces centralized request schema validation for authentication APIs using Zod. It replaces scattered manual validation logic with reusable schema-based validation to improve security, maintainability, and consistency across auth routes.
Fixes #103
Changes Made
Validation Improvements
Signup Validation
Implemented schema validation for:
Username Rules
Password Rules
Password must contain:
Files Modified
frontend/app/api/auth/signup/route.tsfrontend/app/api/auth/login/route.tsfrontend/lib/validations/auth.tspackage.jsonpackage-lock.jsonTech Stack / Libraries
zodfor schema-based validationBenefits
Type of Change
Program
Contributing under: