Token Types
Auth-Agent issues two types of tokens:Access Token
Short-lived JWT for API access (1 hour)
Refresh Token
Long-lived token for refreshing access (30 days)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Understanding access tokens, refresh tokens, and token lifecycle
import { useAuth } from 'ai-auth';
function MyComponent() {
const { getAccessToken } = useAuth();
// Always returns valid token (auto-refreshes if needed)
const token = getAccessToken();
}