Skip to content

feat: implement sign-in and log-in authentication routes#17

Merged
Mark-Vu merged 1 commit intodevfrom
feat/auth-routes-sign-in-log-in
Feb 2, 2026
Merged

feat: implement sign-in and log-in authentication routes#17
Mark-Vu merged 1 commit intodevfrom
feat/auth-routes-sign-in-log-in

Conversation

@chhayaprdn
Copy link
Copy Markdown

  • Added POST /api/auth/sign-in endpoint with Supabase Auth integration
  • Added POST /api/auth/log-in endpoint with Supabase Auth integration
  • Implemented Zod validation for email and password requirements
  • Added password confirmation validation for sign-in
  • Email validation with lowercase transformation
  • Password requires 8+ characters, 1 uppercase, 1 special symbol
  • Added environment variables for local Supabase connection
  • All tests passing successfully

Purpose

This PR implements the authentication endpoints required for user registration and login as given in Issue #7. These routes allow new users to create accounts and existing users to authenticate, with proper validation and security measures in place.

Changes

  • Created /api/auth/log-in route for user authentication
    • Validates email and password format
    • Integrates with Supabase Auth for authentication
    • Returns user info and access token on success
  • Created /api/auth/sign-in route for user registration
    • Validates email format and converts to lowercase
    • Validates password requirements (8+ chars, 1 uppercase, 1 special symbol)
    • Validates password confirmation matches
    • Integrates with Supabase Auth for secure user creation
  • Added Zod validation schemas for input validation
  • Configured local environment variables for Supabase connection
  • All endpoints tested successfully with curl commands

Issue(s)

Closes #7

Additional Comments

  • Pre-existing build errors in types/database.ts and app/admin/page.tsx are unrelated to these changes
  • Using local Supabase instance for development (credentials in .env.local)

Checklists

  • I have thoroughly followed the practices as listed in the contributing guideline
  • I have linted and formatted all of the code locally
  • I have merged all the latest changes into my feature branch and fix any merge conflicts that came up
  • I have thoroughly explained the changes made in the Purpose and Changes sections
  • I have kept my commit history tidy by having succinct commit titles and file changes that accurately reflect my commits

- Added POST /api/auth/sign-in endpoint with Supabase Auth integration
- Added POST /api/auth/log-in endpoint with Supabase Auth integration
- Implemented Zod validation for email and password requirements
- Added password confirmation validation for sign-in
- Email validation with lowercase transformation
- Password requires 8+ characters, 1 uppercase, 1 special symbol
- Added environment variables for local Supabase connection
- All tests passing successfully
@Mark-Vu Mark-Vu merged commit d6fa0da into dev Feb 2, 2026
1 check failed
@Mark-Vu Mark-Vu deleted the feat/auth-routes-sign-in-log-in branch February 2, 2026 01:06
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.

2 participants