/{app_slug}/v1/auth/signinSign in an EndUser
Authenticate with username or verified primary email + password. When the account has no enabled MFA factors, returns a fresh access + refresh token pair (`ConsumerTokenResponseDto` shape). When the account has any enabled factor, returns an MFA challenge instead (`ConsumerMfaChallengeResponseDto` shape, `mfa_required: true`). In that case no session has been created yet — complete the challenge via `POST /auth/mfa/verify` (or `/auth/mfa/recover`) to receive the token pair. When the app runs `auth_config.mfa: "required"` and the account has NO enabled factor, returns a third shape (`ConsumerMfaEnrollmentRequiredResponseDto`, `mfa_enrollment_required: true`) — again no session — which is completed via `POST /auth/mfa/enroll` + `/auth/mfa/enroll/verify`. Inside `mfa_grace_days` of account creation that case instead returns the ordinary token pair with `mfa_enrollment_due_at` set.
Path parameters
app_slug*stringSlug of the app.
Request body
identifier*stringUsername or verified primary email — either accepted. Secondary or unverified emails do not authenticate.
Example: "jane_doe"
password*stringEndUser password.
Example: "correct horse battery staple"
tenant_idstringOptional tenant UUID. When set, the issued JWT carries `tid` + `trole` claims and the user must already be a member of that tenant — non-membership returns 403.
Response · 200 A normal token response, an MFA challenge, or an MFA enrolment demand — distinguish by `mfa_required` / `mfa_enrollment_required`. Neither flag present means a session was minted.
object
Example
Request
POST https://api.auth.productcraft.co/{app_slug}/v1/auth/signin
Content-Type: application/json
{
"identifier": "jane_doe",
"password": "correct horse battery staple",
"tenant_id": "string"
}Response
{}