OAuth Authentication
Agent Explorer supports OAuth 2.0 for communicating with agents that require authentication.
When Authentication is Required
Agents may require authentication when:
- The AgentCard specifies an
authenticationobject with schemes - API calls return
401 Unauthorized - The agent requires a user identity token
Supported Flows
| Flow | Use Case |
|---|---|
authorization_code | Standard web app flow with user consent |
client_credentials | Server-to-server (no user involved) |
implicit | Legacy browser-based flow |
password | Direct username/password grant |
Configuration
In the project Settings tab, configure OAuth:
- Select the OAuth flow type
- Enter Client ID and Client Secret
- Enter the Authorization URL and Token URL
- Specify required Scopes (space-separated)
- Save the configuration
Authorization Code Flow
- Agent Explorer redirects to the authorization server
- User grants permission
- Explorer receives an authorization code via callback
- Code is exchanged for access and refresh tokens
- Tokens are used automatically for all API calls
Token Management
Agent Explorer handles the full token lifecycle:
- Secure Storage — Tokens encrypted with AES-256-GCM before database storage
- Automatic Refresh — Expired tokens are refreshed automatically using the refresh token
- Revocation — Tokens can be revoked from the Settings tab
Authentication Status
The project header displays the current OAuth state:
- Authenticated — Valid token is present
- Not Authenticated — No token or expired without refresh token
- Auth Required — Agent requires authentication to proceed
Security
- OAuth client secrets are encrypted with AES-256-GCM before storage
- CSRF protection via state parameter on authorization code flows
- Use HTTPS in production
- Request minimal scopes necessary for your use case