Skip to main content
POST
/
auth
/
login-email
Log in with email
curl --request POST \
  --url https://api.example.com/auth/login-email \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>"
}
'
{
  "token": "<string>",
  "message": "<string>"
}
Signs in an existing user using Firebase Authentication. Returns a JWT token on success.
This endpoint does not require authentication.

Request body

email
string
required
The email address associated with the account.
password
string
required
The account password. Validated by Firebase Authentication.

Response

200 — Success

token
string
required
A signed JWT valid for 1000 days. Pass this value in the x-access'courser-auth-token header on authenticated requests.
message
string
required
Always "Login successful".

401 — Incorrect credentials

message
string
"Incorrect email or password"

Example

curl --request POST \
  --url http://localhost:8000/auth/login-email \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "[email protected]",
    "password": "securepassword123"
  }'
200
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "message": "Login successful"
}
401
{
  "message": "Incorrect email or password"
}

Build docs developers (and LLMs) love