> ## Documentation Index
> Fetch the complete documentation index at: https://docs.miteos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuth Integrations

> Connect services via OAuth2 authorization flows.

# OAuth Integrations

OAuth integrations use a popup-based authorization flow. Tokens are encrypted in the vault and refreshed automatically.

## Flow

1. User clicks "Connect" on the Integrations page
2. Backend returns an auth\_url for the OAuth provider
3. Frontend opens a popup to that URL
4. User authorizes in the popup
5. Provider redirects back with an auth code
6. Backend exchanges code for tokens, stores encrypted
7. Integration marked as connected

## Supported Providers

| Provider        | Scopes                                   |
| --------------- | ---------------------------------------- |
| Gmail           | gmail.modify (read, send, search, label) |
| Google Calendar | calendar (events, availability)          |
| Google Drive    | drive (files, docs, sheets)              |
| Slack           | chat:write, channels:read, files:write   |
| Notion          | Full access (pages, databases)           |
| GitHub          | repo, read:org                           |
| Shopify         | products, orders, inventory              |
| Discord         | bot, messages.read                       |
| Linear          | read, write                              |
| Jira            | read:jira-work, write:jira-work          |
| Airtable        | data.records:read/write                  |
| Figma           | files:read                               |

## Token Security

* Encrypted at rest with per-user keys
* Refresh tokens rotated on every use
* Auto-expire and re-authorize if refresh fails
* Immediate revocation on disconnect
* Never logged or exposed to agents directly
