# Supported OAuth Providers in OmniRoute: Complete Integration Guide

> Integrate OmniRoute with 23 OAuth providers like GitHub and Claude. Discover simplified authentication flows for seamless application integration.

- Repository: [Diego Rodrigues de Sa e Souza/OmniRoute](https://github.com/diegosouzapw/OmniRoute)
- Tags: how-to-guide
- Published: 2026-08-01

---

**OmniRoute supports 23 OAuth providers including Claude, GitHub, Cursor, and Windsurf, consolidated in `src/lib/oauth/providers/` with standardized `authorization_code_pkce` and `import_token` authentication flows.**

OmniRoute centralizes authentication for AI coding assistants and development tools through a unified OAuth subsystem. The repository `diegosouzapw/OmniRoute` maintains all provider integrations under `src/lib/oauth/providers/`, exposing a common interface that standardizes `buildAuthUrl`, `exchangeToken`, and configuration handling across every supported service.

## Complete List of Supported OAuth Providers in OmniRoute

The `PROVIDERS` map in [`src/lib/oauth/providers/index.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers/index.ts) aggregates 23 distinct OAuth services. Each provider implements a consistent interface exposing `config`, `flowType`, and token exchange methods.

### Authorization Code PKCE Providers

Most providers use the secure `authorization_code_pkce` flow. These providers initiate browser-based authentication with PKCE challenges generated via [`src/lib/oauth/utils/pkce.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/utils/pkce.ts):

- **Claude** (`claude`): Anthropic Claude authentication via [`claude.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/claude.ts)
- **Codex** (`codex`): OpenAI Codex integration via [`codex.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/codex.ts)
- **Antigravity** (`antigravity`): Google-based OAuth for Antigravity via [`antigravity.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/antigravity.ts)
- **AGY** (`agy`): Browser-specific alias for Antigravity via [`agy.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/agy.ts)
- **Qoder** (`qoder`): Qoder AI authentication via [`qoder.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/qoder.ts)
- **Kimi Coding** (`kimi-coding`): Moonshot AI Kimi coding assistant via [`kimi-coding.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/kimi-coding.ts)
- **GitHub** (`github`): Standard GitHub OAuth via [`github.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/github.ts)
- **GitHub Enterprise Copilot** (`ghe-copilot`): Enterprise GitHub Copilot via [`ghe-copilot.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/ghe-copilot.ts)
- **GitLab Duo** (`gitlab-duo`): GitLab Duo integration via [`gitlab-duo.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/gitlab-duo.ts)
- **Kiro** (`kiro`): Kiro AI authentication via [`kiro.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/kiro.ts)
- **Amazon Q** (`amazon-q`): Alias for Kiro sharing the same implementation
- **Cursor** (`cursor`): Cursor AI IDE via [`cursor.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/cursor.ts)
- **Trae** (`trae`): Trae IDE authentication via [`trae.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/trae.ts)
- **Kilocode** (`kilocode`): Kilocode platform via [`kilocode.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/kilocode.ts)
- **Cline** (`cline`): Cline AI assistant via [`cline.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/cline.ts)
- **ClinePass** (`clinepass`): Re-uses Cline flow configuration
- **xAI** (`xai-oauth`): xAI OAuth integration via [`xai-oauth.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/xai-oauth.ts)
- **CodeBuddy CN** (`codebuddy-cn`): CodeBuddy China variant via [`codebuddy-cn.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/codebuddy-cn.ts)

### Import Token Flow Providers

These providers bypass browser login, requiring direct token import:

- **Windsurf** (`windsurf`): Uses `import_token` flow with browser login explicitly disabled; implemented in [`windsurf.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/windsurf.ts)
- **Devin-CLI** (`devin-cli`): Shares Windsurf's token format and aliases its implementation
- **Zed** (`zed`): Zed IDE keychain import via [`zed.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/zed.ts)
- **Zed Hosted** (`zed-hosted`): Hosted Zed instances via [`zed-hosted.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/zed-hosted.ts)

### Hybrid Flow Providers

- **Grok-CLI** (`grok-cli`): Supports both `authorization_code_pkce` and `import_token` flows simultaneously via [`grok-cli.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/grok-cli.ts), enabling both browser and CLI authentication methods.

## Provider Registry Architecture

OmniRoute organizes OAuth providers through a centralized registry pattern that decouples provider-specific logic from consumer interfaces.

### The Providers Map

[`src/lib/oauth/providers/index.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers/index.ts) constructs the canonical `PROVIDERS` object by importing each provider module. This map binds string keys (e.g., `'claude'`, `'github'`) to their respective configuration objects and implementation logic.

[`src/lib/oauth/providers.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers.ts) re-exports this registry and exposes high-level helpers:

- **`getProvider(name)`**: Retrieves provider configuration by key
- **`generateAuthData(providerName, redirectUri)`**: Initiates OAuth flows, automatically handling PKCE generation for applicable providers
- **`exchangeTokens(providerName, ...)`**: Handles token exchange and provider-specific post-processing
- **`resolveBrowserOAuthRedirectUri(providerName, redirectUri)`**: Adapts loopback redirects for custom Google OAuth credentials (used primarily by Antigravity variants)

## Implementing OAuth Authentication

Consume the registry through the exported helper functions to initiate authentication flows without managing provider-specific details.

### Starting a PKCE Flow

For providers using `authorization_code_pkce`, generate auth data including state and code verifier:

```typescript
import { generateAuthData } from '@/lib/oauth/providers';

const redirectUri = 'http://localhost:3000/callback';
const { authUrl, state, codeVerifier } = generateAuthData('claude', redirectUri);

// Redirect user to authUrl
console.log('Authenticate at:', authUrl);

```

### Handling Import-Token Providers

Some providers disable browser login and require token import:

```typescript
const windsurfData = generateAuthData('windsurf', 'http://localhost:3000/callback');

if (!windsurfData.supported) {
  console.log('Browser login disabled. Use import-token flow:', windsurfData.error);
  // Proceed with token import workflow
}

```

### Resolving Custom Redirects

When using custom Google OAuth credentials with Antigravity:

```typescript
import { resolveBrowserOAuthRedirectUri } from '@/lib/oauth/providers';

const customRedirect = resolveBrowserOAuthRedirectUri('antigravity', 'http://localhost:3000/callback');
// Returns adjusted redirect URI for Google OAuth client configuration

```

## Key Source Files and Implementation Details

Understanding the file structure enables custom provider development:

- **[`src/lib/oauth/providers/index.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers/index.ts)**: The concrete registry containing all 23 provider definitions
- **[`src/lib/oauth/providers.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers.ts)**: Public API surface exporting `generateAuthData`, `exchangeTokens`, and `getProvider`
- **[`src/lib/oauth/utils/pkce.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/utils/pkce.ts)**: Generates PKCE code verifiers and challenges for PKCE flows
- **Individual provider modules** (e.g., [`src/lib/oauth/providers/grok-cli.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers/grok-cli.ts)): Implement provider-specific endpoints, token exchange logic, and post-exchange handling

### Provider Aliases and Special Cases

Several entries in the registry share implementations:

- **`amazon-q`** resolves to the same module as **`kiro`**
- **`devin-cli`** aliases **`windsurf`** for shared token formatting
- **`clinepass`** re-uses **`cline`** configuration and flow logic
- **`agy`** provides browser-optimized Antigravity authentication distinct from the base `antigravity` provider

## Summary

- OmniRoute consolidates **23 OAuth providers** under `src/lib/oauth/providers/`, ranging from Claude and GitHub to specialized AI tools like Grok-CLI and Kimi Coding
- The **`PROVIDERS`** map in [`src/lib/oauth/providers/index.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers/index.ts) aggregates configurations, while [`src/lib/oauth/providers.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers.ts) exposes consumer-friendly helpers
- **PKCE** handles browser flows for 18 providers, while **import-token** supports keychain-based authentication for Zed, Windsurf, and Devin-CLI
- **`generateAuthData`** automatically selects the appropriate flow type and generates cryptographic parameters when required

## Frequently Asked Questions

### How many OAuth providers does OmniRoute support?

OmniRoute supports 23 distinct OAuth provider entries in the `PROVIDERS` registry, including 18 PKCE-based browser flows and 5 import-token or hybrid configurations. This count includes aliased providers such as `amazon-q` (Kiro) and `agy` (Antigravity browser variant).

### What is the difference between PKCE and import-token flows in OmniRoute?

**`authorization_code_pkce`** providers like Claude and GitHub generate cryptographically secure `codeVerifier` and `codeChallenge` pairs via [`src/lib/oauth/utils/pkce.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/utils/pkce.ts), redirecting users through browser authentication. **`import_token`** providers like Zed and Windsurf disable browser login entirely, requiring users to import pre-existing tokens from keychains or CLI sessions.

### Where are OmniRoute OAuth providers configured?

Provider definitions reside in individual TypeScript modules under `src/lib/oauth/providers/` (e.g., [`github.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/github.ts), [`cursor.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/cursor.ts)). The [`src/lib/oauth/providers/index.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers/index.ts) file imports these modules to construct the exported `PROVIDERS` map, while [`src/lib/oauth/providers.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers.ts) wraps this registry with helper functions like `generateAuthData` and `exchangeTokens`.

### How do I add a custom OAuth provider to OmniRoute?

Create a new TypeScript file in `src/lib/oauth/providers/` implementing the provider interface with `config`, `flowType`, `buildAuthUrl`, and `exchangeToken` methods. Import this module into [`src/lib/oauth/providers/index.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/providers/index.ts) and add it to the `PROVIDERS` map with a unique string key. If using PKCE, import utilities from [`src/lib/oauth/utils/pkce.ts`](https://github.com/diegosouzapw/OmniRoute/blob/main/src/lib/oauth/utils/pkce.ts) to generate challenges.