auth

Authenticate user

Signs in a user with email and password, returns user data with session token

post/api/custom-auth/signin

Request

  • Base URL: https://localhost:8080
  • URL: https://localhost:8080/api/custom-auth/signin
  • Auth: none declared

Request body

emailstring required

User email address

passwordstring required

User password

totpCodestring

Authenticator code, for an account with two-factor on

backupCodestring

One of the account backup codes, in place of totpCode

Example request

{
  "email": "john.doe@example.com",
  "password": "SecurePassword123!"
}

Response

User successfully authenticated

Example response

{
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "emailVerified": true,
    "firstName": "John",
    "lastName": "Doe",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z"
  },
  "session": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "token": "session_token_abc123",
    "expiresAt": "2024-01-02T00:00:00.000Z",
    "userId": "123e4567-e89b-12d3-a456-426614174000"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.