Login
Authenticate a user and obtain a JWT token for accessing protected endpoints.Authentication
Requires JWT authentication viaAuthorization: Bearer <token> header.
Headers
Bearer token for authentication
Request content type
Response content type
Request origin
Request Body
User’s wallet address for authentication
Cryptographic signature proving wallet ownership
The message that was signed by the wallet
Response
Successfully authenticated
Response Schema
JWT authentication token for subsequent API requests
Token expiration time in seconds
Example Usage
Error Responses
Bad Request - Invalid credentials or malformed request
Unauthorized - Authentication failed
Logout
Invalidate the current user session and JWT token.Authentication
Requires JWT authentication viaAuthorization: Bearer <token> header.
Headers
Bearer token to invalidate
Response content type
Request origin
Response
Successfully logged out
Example Usage
Best Practices
- Always call the logout endpoint when the user explicitly logs out
- Clear the JWT token from local storage after logout
- Handle logout on token expiration
- Implement automatic logout after a period of inactivity
Authentication Flow
- Request Message: Request a message to sign from the platform
- Sign Message: User signs the message with their wallet
- Login: Submit wallet address, signature, and message to
/auth/login - Receive Token: Store the JWT token securely
- Use Token: Include token in
Authorizationheader for all API requests - Logout: Call
/auth/logoutto invalidate the session
Related Endpoints
- GET /auth/my-profile - Get current user profile
- POST /users/register - Register new user
- GET /auth/is-valid-jurisdiction - Check jurisdiction validity