{"record":{"id":"74051d4d6cdb0fbc","repo":"diegosouzapw/OmniRoute","slug":"grok-returned-an-unsupported-verification-url","errorCode":null,"errorMessage":"Grok returned an unsupported verification URL","messagePattern":"Grok returned an unsupported verification URL","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/oauth/providers/grok-cli.ts","lineNumber":86,"sourceCode":"    [...value].some((character) => {\n      const codePoint = character.codePointAt(0) ?? 0;\n      return codePoint <= 0x1f || codePoint === 0x7f;\n    })\n  ) {\n    throw new Error(\"Grok returned an invalid verification URL\");\n  }\n\n  let url: URL;\n  try {\n    url = new URL(value);\n  } catch {\n    throw new Error(\"Grok returned an invalid verification URL\");\n  }\n\n  const isLocalHttp =\n    url.protocol === \"http:\" && (url.hostname === \"localhost\" || url.hostname === \"127.0.0.1\");\n  if (url.protocol !== \"https:\" && !isLocalHttp) {\n    throw new Error(\"Grok returned an unsupported verification URL\");\n  }\n}\n\n/**\n * Device-code flow (#7358). Kept alongside the browser PKCE flow below (#7013\n * rework) — see grokCli.flowType, which stays \"device_code\" so it remains the\n * primary/default experience in OAuthModal.tsx and the route.ts device-code\n * action family.\n *\n * `grokCli.config` below is GROK_BUILD_OAUTH_CONFIG (the browser-PKCE shape —\n * required so it stays reference-equal for oauth-providers-config.test.ts and\n * so buildAuthUrl/exchangeToken keep receiving the right config). The\n * device-code endpoints and scope live on a DIFFERENT config (GROK_CLI_CONFIG:\n * deviceCodeUrl + a wider legacy scope set) that has no `authorizeUrl`/\n * `loopbackPort` shape, so requestDeviceCode/pollToken intentionally ignore\n * whatever config providers.ts passes them and always read GROK_CLI_CONFIG\n * directly.\n */","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/providers/grok-cli.ts#L68-L104","documentation":"Error \"Grok returned an unsupported verification URL\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/providers/grok-cli.ts:86 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"}