Overview
Cryptorobot.ai supports multiple authentication strategies:Login (Local Strategy)
Exchange email and password for a JWT access token:Response
Using the Token
Include the JWT token in theAuthorization header for all authenticated requests:
Token Refresh
Tokens can be refreshed by authenticating with the existing (still valid) token:Google OAuth
For web applications, redirect users to the Google OAuth flow:Logout
Invalidate the current session:Session Management
List active sessions for the current user:Security Best Practices
Store tokens securely
Store tokens securely
Never expose JWT tokens in client-side JavaScript, URLs, or logs. Use
httpOnly cookies or secure storage mechanisms.Use API keys for bots
Use API keys for bots
For automated trading bots and server-to-server communication, use API keys instead of user credentials.
Rotate credentials regularly
Rotate credentials regularly
Periodically rotate API keys and re-authenticate to minimize exposure from leaked credentials.
Use HTTPS only
Use HTTPS only
All API requests must use HTTPS. HTTP requests are rejected.

