From 950217ed3ca93a0aa0e964c2a8474ffc13c71912 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 3 Dec 2025 05:28:29 +0900 Subject: feat(auth): add user registration endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement POST /api/auth/register endpoint with: - Argon2 password hashing - Zod validation for username (1-255 chars) and password (8-255 chars) - Duplicate username check (returns 409 Conflict) - Returns created user with id, username, and createdAt 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- pkgs/shared/src/schemas/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/shared/src/schemas/index.ts') diff --git a/pkgs/shared/src/schemas/index.ts b/pkgs/shared/src/schemas/index.ts index c211381..28b5f55 100644 --- a/pkgs/shared/src/schemas/index.ts +++ b/pkgs/shared/src/schemas/index.ts @@ -28,7 +28,7 @@ export const userSchema = z.object({ // User creation input schema export const createUserSchema = z.object({ username: z.string().min(1).max(255), - password: z.string().min(8).max(255), + password: z.string().min(15).max(255), }); // Login input schema -- cgit v1.2.3-70-g09d2