> **Building with AI coding agents?** If you're using an AI coding agent, install the official Scalekit plugin. It gives your agent full awareness of the Scalekit API — reducing hallucinations and enabling faster, more accurate code generation.
>
> - **Claude Code**: `/plugin marketplace add scalekit-inc/claude-code-authstack` then `/plugin install <auth-type>@scalekit-auth-stack`
> - **GitHub Copilot CLI**: `copilot plugin marketplace add scalekit-inc/github-copilot-authstack` then `copilot plugin install <auth-type>@scalekit-auth-stack`
> - **Codex**: run the bash installer, restart, then open Plugin Directory and enable `<auth-type>`
> - **Skills CLI** (Windsurf, Cline, 40+ agents): `npx skills add scalekit-inc/skills --list` then `--skill <skill-name>`
>
> `<auth-type>` / `<skill-name>`: `agent-auth`, `full-stack-auth`, `mcp-auth`, `modular-sso`, `modular-scim` — [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Authentication Methods Comparison

Agent Auth supports multiple authentication methods to connect with third-party providers. This guide helps you understand the differences and choose the right authentication method for your use case.

## Authentication methods overview
**OAuth 2.0**
**Most secure and widely supported**

User-delegated authentication with automatic token refresh and granular permissions.

**Best for:** Google, Microsoft, Slack, GitHub

**API Keys**
**Simple static credentials**

Provider-issued keys for straightforward server-to-server authentication.

**Best for:** Jira, Asana, Linear, Airtable

**Bearer Tokens**
**User-generated tokens**

Personal access tokens with scoped permissions for individual use.

**Best for:** GitHub PATs, GitLab tokens

**Custom JWT**
**Advanced signed tokens**

Cryptographically signed tokens for service accounts and custom protocols.

**Best for:** Custom integrations, service accounts

## Comparison matrix

| Feature | OAuth 2.0 | API Keys | Bearer Tokens | Custom JWT |
|---------|-----------|----------|---------------|------------|
| **Security Level** | High | Medium | Medium | High |
| **User Interaction** | Required | Optional | Required | Not required |
| **Token Refresh** | Automatic | N/A | Manual | Varies |
| **Setup Complexity** | Moderate | Easy | Easy | Complex |
| **Granular Permissions** | Yes | Limited | Yes | Limited |
| **Provider Support** | Widespread | Common | Common | Limited |

## When to use each method

### OAuth 2.0

**Use when:**
- Provider supports OAuth
- Acting on behalf of users
- Need automatic token refresh
- Require granular permissions
- Building user-facing applications

**Example:** User connects Gmail to send emails through your app

### API Keys

**Use when:**
- Provider only supports API keys
- Building internal tools
- Server-to-server communication
- Simplicity is priority

**Example:** Automated Jira ticket creation for support system

### Bearer Tokens

**Use when:**
- Personal access is sufficient
- Building developer tools
- OAuth unavailable
- User prefers manual control

**Example:** Personal GitHub repository automation

### Custom JWT

**Use when:**
- Provider requires JWT
- Service account access needed
- Custom authentication protocol
- Advanced security requirements

**Example:** Enterprise service account integrations

## Next steps

- [Providers](/agent-auth/providers) - Available third-party providers
- [Connections](/agent-auth/connections) - Configure provider connections
- [Authorization Methods](/agent-auth/tools/authorize) - Detailed authentication implementation

---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
