feat(auth): add Zod validation for authentication utility endpoints#578
feat(auth): add Zod validation for authentication utility endpoints#578chrisyangxiaoqi wants to merge 3 commits into
Conversation
Add request validation for /auth/mobile/exchange and /auth/refresh using Zod schemas, as described in Dev-Card#540. - New file: apps/backend/src/validations/auth.validation.ts - mobileExchangeSchema: validates UUID exchange code - refreshTokenSchema: validates optional refresh_token in body - Updated apps/backend/src/routes/auth.ts: - /auth/mobile/exchange now validates request body with mobileExchangeSchema - /auth/refresh now validates request body with refreshTokenSchema - New test file: apps/backend/src/__tests__/auth.validation.test.ts Part of Dev-Card#540
|
Someone is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @chrisyangxiaoqi, Thanks for opening this pull request. This PR has been automatically classified based on the files modified. Applied Labels
Primary Review Area
Reviewer@Harxhit has been identified as the primary reviewer for this pull request. If you have any questions regarding the affected area or implementation details, feel free to reach out to the assigned reviewer. Thank you for your contribution! |
CI — All Checks PassedBackend — PASS
Mobile — SKIP
Web — SKIP
Last updated: |
Remove .js extension from TypeScript import to fix lint error. Part of Dev-Card#540
Group all parent (../) imports together with no empty lines, add empty line before type imports group. Fixes Dev-Card#540
|
Hi, gentle ping on this PR. All CI checks are passing. Would appreciate a review. Thanks! |
|
Hi @Dev-Card/maintainers, requesting a review for this PR. It fixes the backend to return proper JSON response and adds CORS support. Tests added. Thanks! |
|
Thank you for contribution as your pr is duplicate and issue is not assigned to you closing the pull request please pick issues that are not assigned to any contributors. |
Summary
Add request validation for and using Zod schemas, as described in #540.
Changes
New file :
Updated :
New test file :
Acceptance Criteria
Part of #540