Skip to main content
All authentication endpoints are mounted under /auth.

Endpoints

1. Register User

POST /auth/signup Registers a new user with an email, name, and password. An email verification OTP is generated and sent via Resend.
Request Body

2. Verify Email OTP

POST /auth/verify-email Validates the 6-digit OTP code sent to the user’s email address. Upon success, marks the email as verified, creates an active session, and sets the HTTP-only session cookie.
Request Body

3. User Login

POST /auth/login Authenticates an existing user via email and password credentials. Sets an HTTP-only session cookie.
Request Body

4. Forgot Password Request

PATCH /auth/forgot-password Requests a password reset OTP for a registered account.
Request Body

5. Verify Forgot Password OTP

PATCH /auth/verify-forgot-password Verifies the password recovery OTP code.
Request Body

6. Reset Password

PATCH /auth/reset-password Updates the account password for an authenticated session or verified user.
Request Body

7. Get Current Session

GET /auth/session Retrieves the caller’s active session metadata and user ID from the HTTP-only cookie.

8. List All Active Sessions

GET /auth/sessions Returns a list of all active devices and sessions for the authenticated user.

9. Sign Out Current Device

DELETE /auth/logout Revokes the current session in Redis and clears the session cookie.

10. Sign Out All Devices

DELETE /auth/logout-all Revokes all active sessions for the user across all browsers and devices.