diegosouzapw/OmniRoute · error
Grok returned an invalid verification URL
Error message
Grok returned an invalid verification URL
What it means
Error "Grok returned an invalid verification URL" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/oauth/providers/grok-cli.ts:73
try {
const value = await response.json();
return value && typeof value === "object" ? (value as Record<string, unknown>) : {};
} catch {
return {
error: "invalid_response",
error_description: "xAI returned a non-JSON OAuth response",
};
}
}
function validateVerificationUri(value: string): void {
if (
[...value].some((character) => {
const codePoint = character.codePointAt(0) ?? 0;
return codePoint <= 0x1f || codePoint === 0x7f;
})
) {
throw new Error("Grok returned an invalid verification URL");
}
let url: URL;
try {
url = new URL(value);
} catch {
throw new Error("Grok returned an invalid verification URL");
}
const isLocalHttp =
url.protocol === "http:" && (url.hostname === "localhost" || url.hostname === "127.0.0.1");
if (url.protocol !== "https:" && !isLocalHttp) {
throw new Error("Grok returned an unsupported verification URL");
}
}
/**
* Device-code flow (#7358). Kept alongside the browser PKCE flow below (#7013View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/oauth/providers/grok-cli.ts:73 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/64d5466febb3cd9c.
Report an issue: GitHub.