diegosouzapw/OmniRoute · error
Device authorization response missing…
Error message
Device authorization response missing verification_uri_complete
What it means
Last structural check in kimi-coding's requestDeviceCode: device_code and user_code are present, but verification_uri_complete is falsy. The response omits the combined verification URL that lets the UI deep-link the user into the confirm page with the code pre-filled.
Solutions
- Check the raw JSON — some OAuth servers omit verification_uri_complete by design and only return verification_uri; confirm Kimi's contract
- Retry the request if the omission is intermittent
- If the field is optional upstream, consider falling back to verification_uri + manual user_code entry instead of failing
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/lib/oauth/providers/kimi-coding.ts:79 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/3de0d7b15c281188.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/oauth/providers/kimi-coding.ts:79
requestDeviceCode: async (config) => {
const response = await fetch(config.deviceCodeUrl, {
method: "POST",
headers: getKimiOAuthHeaders(),
body: new URLSearchParams({
client_id: config.clientId,
}),
});
if (!response.ok) {
const error = await response.text();
throw new Error(`Device code request failed: ${error}`);
}
const data = await response.json();
if (!data?.device_code) throw new Error("Device authorization response missing device_code");
if (!data?.user_code) throw new Error("Device authorization response missing user_code");
if (!data?.verification_uri_complete) {
throw new Error("Device authorization response missing verification_uri_complete");
}
return {
device_code: data.device_code,
user_code: data.user_code,
verification_uri: data.verification_uri || "",
verification_uri_complete: data.verification_uri_complete,
expires_in: data.expires_in,
interval: data.interval || 5,
};
},
pollToken: async (config, deviceCode) => {
const response = await fetch(config.tokenUrl, {
method: "POST",
headers: getKimiOAuthHeaders(),
body: new URLSearchParams({
client_id: config.clientId,
device_code: deviceCode,
grant_type: "urn:ietf:params:oauth:grant-type:device_code",View on GitHub (pinned to a179ffed5b)