Supported OAuth Providers in OmniRoute: Complete Integration Guide

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 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:

  • Claude (claude): Anthropic Claude authentication via claude.ts
  • Codex (codex): OpenAI Codex integration via codex.ts
  • Antigravity (antigravity): Google-based OAuth for Antigravity via antigravity.ts
  • AGY (agy): Browser-specific alias for Antigravity via agy.ts
  • Qoder (qoder): Qoder AI authentication via qoder.ts
  • Kimi Coding (kimi-coding): Moonshot AI Kimi coding assistant via kimi-coding.ts
  • GitHub (github): Standard GitHub OAuth via github.ts
  • GitHub Enterprise Copilot (ghe-copilot): Enterprise GitHub Copilot via ghe-copilot.ts
  • GitLab Duo (gitlab-duo): GitLab Duo integration via gitlab-duo.ts
  • Kiro (kiro): Kiro AI authentication via kiro.ts
  • Amazon Q (amazon-q): Alias for Kiro sharing the same implementation
  • Cursor (cursor): Cursor AI IDE via cursor.ts
  • Trae (trae): Trae IDE authentication via trae.ts
  • Kilocode (kilocode): Kilocode platform via kilocode.ts
  • Cline (cline): Cline AI assistant via cline.ts
  • ClinePass (clinepass): Re-uses Cline flow configuration
  • xAI (xai-oauth): xAI OAuth integration via xai-oauth.ts
  • CodeBuddy CN (codebuddy-cn): CodeBuddy China variant via 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
  • Devin-CLI (devin-cli): Shares Windsurf's token format and aliases its implementation
  • Zed (zed): Zed IDE keychain import via zed.ts
  • Zed Hosted (zed-hosted): Hosted Zed instances via zed-hosted.ts

Hybrid Flow Providers

  • Grok-CLI (grok-cli): Supports both authorization_code_pkce and import_token flows simultaneously via 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 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 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:

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:

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:

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:

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 aggregates configurations, while 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, 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, cursor.ts). The src/lib/oauth/providers/index.ts file imports these modules to construct the exported PROVIDERS map, while 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 and add it to the PROVIDERS map with a unique string key. If using PKCE, import utilities from src/lib/oauth/utils/pkce.ts to generate challenges.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →