User Login

POST /auth/login

Authenticates a user with email and password, returns user info and sets an HTTP-only auth cookie.

application/json

Body Required

Login Credentials

  • email string Required
  • password string Required

Responses

  • 200 application/json

    message: Login successful, user: domain.User

    Additional properties are allowed.

  • 400 application/json

    Invalid request data

    Hide response attribute Show response attribute object
    • * string Additional properties
  • 401 application/json

    Invalid email or password

    Hide response attribute Show response attribute object
    • * string Additional properties
POST /auth/login
curl \
 --request POST 'http://api.example.com/auth/login' \
 --header "Content-Type: application/json" \
 --data '{"email":"string","password":"string"}'
Request examples
{
  "email": "string",
  "password": "string"
}
Response examples (200)
{}
Response examples (400)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
Response examples (401)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}