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 viaclaude.ts - Codex (
codex): OpenAI Codex integration viacodex.ts - Antigravity (
antigravity): Google-based OAuth for Antigravity viaantigravity.ts - AGY (
agy): Browser-specific alias for Antigravity viaagy.ts - Qoder (
qoder): Qoder AI authentication viaqoder.ts - Kimi Coding (
kimi-coding): Moonshot AI Kimi coding assistant viakimi-coding.ts - GitHub (
github): Standard GitHub OAuth viagithub.ts - GitHub Enterprise Copilot (
ghe-copilot): Enterprise GitHub Copilot viaghe-copilot.ts - GitLab Duo (
gitlab-duo): GitLab Duo integration viagitlab-duo.ts - Kiro (
kiro): Kiro AI authentication viakiro.ts - Amazon Q (
amazon-q): Alias for Kiro sharing the same implementation - Cursor (
cursor): Cursor AI IDE viacursor.ts - Trae (
trae): Trae IDE authentication viatrae.ts - Kilocode (
kilocode): Kilocode platform viakilocode.ts - Cline (
cline): Cline AI assistant viacline.ts - ClinePass (
clinepass): Re-uses Cline flow configuration - xAI (
xai-oauth): xAI OAuth integration viaxai-oauth.ts - CodeBuddy CN (
codebuddy-cn): CodeBuddy China variant viacodebuddy-cn.ts
Import Token Flow Providers
These providers bypass browser login, requiring direct token import:
- Windsurf (
windsurf): Usesimport_tokenflow with browser login explicitly disabled; implemented inwindsurf.ts - Devin-CLI (
devin-cli): Shares Windsurf's token format and aliases its implementation - Zed (
zed): Zed IDE keychain import viazed.ts - Zed Hosted (
zed-hosted): Hosted Zed instances viazed-hosted.ts
Hybrid Flow Providers
- Grok-CLI (
grok-cli): Supports bothauthorization_code_pkceandimport_tokenflows simultaneously viagrok-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 keygenerateAuthData(providerName, redirectUri): Initiates OAuth flows, automatically handling PKCE generation for applicable providersexchangeTokens(providerName, ...): Handles token exchange and provider-specific post-processingresolveBrowserOAuthRedirectUri(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:
src/lib/oauth/providers/index.ts: The concrete registry containing all 23 provider definitionssrc/lib/oauth/providers.ts: Public API surface exportinggenerateAuthData,exchangeTokens, andgetProvidersrc/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): Implement provider-specific endpoints, token exchange logic, and post-exchange handling
Provider Aliases and Special Cases
Several entries in the registry share implementations:
amazon-qresolves to the same module askirodevin-clialiaseswindsurffor shared token formattingclinepassre-usesclineconfiguration and flow logicagyprovides browser-optimized Antigravity authentication distinct from the baseantigravityprovider
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
PROVIDERSmap insrc/lib/oauth/providers/index.tsaggregates configurations, whilesrc/lib/oauth/providers.tsexposes consumer-friendly helpers - PKCE handles browser flows for 18 providers, while import-token supports keychain-based authentication for Zed, Windsurf, and Devin-CLI
generateAuthDataautomatically 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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →