{"record":{"id":"03fc5ccb44c32b8f","repo":"diegosouzapw/OmniRoute","slug":"paste-credentials-not-supported-for-provider-ro","errorCode":null,"errorMessage":"paste-credentials not supported for provider: ${routeProvider}. Supported: ${[...PASTE_CREDENTIAL_PROVIDERS].join(\", \")}","messagePattern":"paste-credentials not supported for provider: (.+?)\\. Supported: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/oauth/pasteCredentials.ts","lineNumber":34,"sourceCode":"\nimport { decodeCredentialBlob, type CredentialBlob } from \"./credentialBlob\";\n\n/**\n * Providers eligible for the paste-credentials flow: Google native-loopback\n * clients whose consent cannot complete on a headless/remote host. `agy` is the\n * Antigravity alias. Codex is intentionally excluded — it has its own browser\n * device flow (`device-complete`) that works remotely.\n */\nexport const PASTE_CREDENTIAL_PROVIDERS = new Set([\"antigravity\", \"agy\"]);\n\n/**\n * Validate + decode a pasted credential blob for a given route provider.\n * Throws a descriptive error if the provider is not allowlisted, if the blob's\n * embedded provider does not match, or if the blob itself is malformed.\n */\nexport function parsePastedCredentials(routeProvider: string, blob: string): CredentialBlob {\n  if (!PASTE_CREDENTIAL_PROVIDERS.has(routeProvider)) {\n    throw new Error(\n      `paste-credentials not supported for provider: ${routeProvider}. ` +\n        `Supported: ${[...PASTE_CREDENTIAL_PROVIDERS].join(\", \")}`\n    );\n  }\n\n  // decodeCredentialBlob validates prefix/version/JSON shape + access_token.\n  const decoded = decodeCredentialBlob(blob);\n\n  if (decoded.provider !== routeProvider) {\n    throw new Error(\n      `Pasted credential provider mismatch: blob is for \"${decoded.provider}\" ` +\n        `but the route provider is \"${routeProvider}\"`\n    );\n  }\n\n  return decoded;\n}\n","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/pasteCredentials.ts#L16-L52","documentation":"Error \"paste-credentials not supported for provider: ${routeProvider}. Supported: ${[...PASTE_CREDENTIAL_PROVIDERS].join(\", \")}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/pasteCredentials.ts:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}