OAuth
OAuth integration for channel authentication.
Overview
Some channels require OAuth for authentication:
- Discord
- Slack
- Google (Gmail, Calendar)
OAuth Flow
1. User initiates setup
2. Redirect to provider login
3. User authorizes
4. Callback with token
5. Token stored securelySupported Providers
| Provider | Channels/Features |
|---|---|
| Discord | Bot + User access |
| Slack | Workspace access |
| Gmail, Calendar |
Configuration
json5
{
oauth: {
callbackUrl: "http://localhost:3000/oauth/callback",
discord: {
clientId: "...",
clientSecret: "..."
},
slack: {
clientId: "...",
clientSecret: "..."
}
}
}Setting Up OAuth
bash
# Discord OAuth
openclaw channels setup discord --oauth
# Slack OAuth
openclaw channels setup slack --oauthToken Management
Tokens are stored securely and refreshed automatically when possible.
bash
# View OAuth status
openclaw channels status --oauth
# Re-authenticate
openclaw channels reauth discordSecurity
- Tokens encrypted at rest
- Refresh tokens used when available
- Scope limited to necessary permissions