diegosouzapw/OmniRoute · error
Unknown provider
Error message
Unknown provider: ${name} What it means
getProvider looked up name in the static PROVIDERS registry and found no entry. The requested OAuth provider key is unknown at runtime — a typo, a stale reference, or a provider that is not registered in this build; nothing environmental.
Solutions
- Use a provider id from the providers constant/registry
- Register the provider before requesting its handler
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/lib/oauth/providers.ts:120 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/7e1bb31bcd176a9b.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/oauth/providers.ts:120
try {
const requested = new URL(redirectUri);
if (!isLoopbackHostname(requested.hostname)) {
return redirectUri;
}
return upgradeLoopbackToPublic(redirectUri, publicBaseUrl);
} catch {
return redirectUri;
}
}
/**
* Get provider handler
*/
export function getProvider(name) {
const provider = PROVIDERS[name];
if (!provider) {
throw new Error(`Unknown provider: ${name}`);
}
return provider;
}
/**
* Generate auth data for a provider.
*
* Returns `{ supported: false, error }` (no `authUrl`) for providers whose
* browser-OAuth flow is currently disabled — e.g. Devin Desktop / Devin CLI.
* Callers (UI / API route) should surface the `error` string and route the
* user to the import-token flow instead.
*/
export function generateAuthData(providerName, redirectUri) {
const provider = getProvider(providerName);
const pkce = generatePKCE(provider.pkceVerifierBytes || 32);
let codeVerifier = pkce.codeVerifier;
const { codeChallenge, state } = pkce;
View on GitHub (pinned to a179ffed5b)