Sessions & Authentication

User login, session management, and API key operations

Sessions & Authentication

Authentication domain handles user login, session management, and API key operations.

Key Concepts

  • Session: Server-side state tied to a refresh token (UUID)
  • Access Token: Short-lived JWT for API requests
  • Refresh Token: Long-lived session identifier for token renewal
  • API Key: Credentials for programmatic access

Endpoints Overview

EndpointMethodDescription
/auth/loginPOSTAuthenticate with credentials
/auth/logoutPOSTInvalidate session
/auth/refreshPOSTGet new access token
/auth/mfa/verifyPOSTComplete MFA challenge
/auth/mfa/setupPOSTInitialize MFA setup
/auth/password/resetPOSTRequest password reset
/auth/password/changePOSTChange password
/api-keysGETList API keys
/api-keysPOSTCreate API key
/api-keys/{id}DELETERevoke API key

Session Flow

Login → [MFA if enabled] → Access Token + Session Token
                                   │
                                   ▼
                          Use Access Token in requests
                                   │
                                   ▼ (before expiry)
                          Refresh → New Access Token

MFA States

StateDescription
Not ConfiguredMFA not set up
Setup PendingTOTP secret generated, awaiting confirmation
EnabledMFA required on login

API Key Permissions

API keys can have a subset of user permissions:

PermissionAllows
readView data
tradePlace/cancel orders
withdrawInitiate withdrawals
depositGenerate deposit addresses

Related Use Cases




  © 2025 Taurus SA. All rights reserved.