---
title: "Login with Supabase"
method: POST
path: "/auth/login"
tags: ["auth"]
---

# Login with Supabase

`POST /auth/login`

## Request

- Base URL: `http://localhost:3001`
- URL: `http://localhost:3001/auth/login`
- Auth: HTTP bearer

Authenticate with email and password to get JWT tokens

## Request body

- LoginDto
  - `email` string, required: User email address
  - `password` string, required: User password

## Response `200`

Login successful - use accessToken in Authorization header

- object
  - `data` LoginResponseDto
    - `accessToken` string, required: JWT access token for API authentication
    - `refreshToken` string, required: Refresh token for getting new access tokens
    - `user` object, required: Authenticated user information
    - `tokenType` string, required: Token type
    - `usage` string, required: How to use the token
  - `success` boolean
  - `message` string

## Other responses

- `400`: Bad Request - Invalid input or validation failed
- `401`: Unauthorized - Authentication required or invalid token
- `403`: Forbidden - Insufficient permissions to access this resource
- `404`: Not Found - The requested resource does not exist
- `500`: Internal Server Error - An unexpected error occurred

---

[API](https://skmtc.dev/spliteo/apis/spliteo-api.md) · [All operations](https://skmtc.dev/spliteo/apis/spliteo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spliteo/apis/spliteo-api/revisions/bd9b84f4e407?raw)
