Skip to main content

index/variables/JWT_CONSTANTS.md

const JWT_CONSTANTS: object

JWT Authentication Constants

Type Declaration​

NameTypeDescription
AUTH_HEADER"Authorization"Authorization header name
BEARER_PREFIX"Bearer "Bearer token prefix
DEFAULT_EXPIRY_S86400Default token expiry in seconds (24 hours) Backend sends this in the login response, but we use this as fallback
LOGIN_MESSAGE_PREFIX"Sign in to Launchpad t:"Message prefix for signing login requests Must match backend's expected format exactly
REFRESH_THRESHOLD_MSnumberRefresh token if it expires within this time (default 5 minutes) Auto-refresh is triggered during requests when token is close to expiry