Skip to content

Log in a storefront customer​

POST
/auth/login

Authenticates a customer against the resolved tenant by email/password and returns a 7-day customer JWT plus a rotating refreshToken (90 days sliding, 365 days max per sign-in; see POST /auth/refresh) and expiresIn (access token lifetime, seconds). Each login opens a new token family (one per device).

Auth: Public (no authentication).

Request Body​

application/json
JSON
{
  
"email": "user@example.com",
  
"password": "string"
}

Responses​

Authenticated; returns token + customer profile

application/json
JSON
{
  
"ok": true,
  
"data": {
  
  
"token": "string",
  
  
"refreshToken": "string",
  
  
"expiresIn": 604800,
  
  
"customer": {
  
  
  
"customerId": "string",
  
  
  
"email": "user@example.com",
  
  
  
"firstName": "string",
  
  
  
"lastName": "string",
  
  
  
"phone": "string",
  
  
  
"emailVerified": true,
  
  
  
"createdAt": "2024-01-01T00:00:00Z"
  
  
}
  
}
}

Playground​

Body

Samples​

Powered by VitePress OpenAPI

Tarifs : contactez-nous — contact@marketkit.ai