On this page6 sections
POST/api/auth/loginAuthentication
User Login
Authenticates a user with email or username and password via Supabase Auth without setting auth cookies. Verifies approval status, tenant assignment, and returns a Bearer JWT and refresh token pair (`Cache-Control: no-store`).
Authentication: Public endpoint — no Bearer token required.
Request
Provide the following fields in the request payload.
emailstringoptional
Registered email address (optional if username is provided).
usernamestringoptional
Registered username (used when email is omitted).
passwordstringrequired
Account password.
Responses
Select a status code to inspect schema.
Login succeeded. Returns access token, refresh token, and synchronized session user.application/json
successenum('true')
Success (true).
messagestring
Message.
dataobject | null
Response payload or null.
POST/api/auth/login
curl -X POST "https://api.invoger.com/api/auth/login" \
-H "Content-Type: application/json" \
-d '{ "email": "owner@company.com", "password": "••••••••" }'Interactive playground
Response
application/json
{
"success": true,
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "v1.MRmO7x...",
"expiresAt": 1795664910,
"tokenType": "bearer",
"user": {
"id": "e4f8b910-1234-4567-89ab-cdef01234567",
"email": "owner@company.com",
"username": "owner",
"name": "Budi Santoso",
"role": "System Owner"
}
}
}