{"record":{"id":"c4521bd6d0ad41da","repo":"diegosouzapw/OmniRoute","slug":"missing-id-token","errorCode":"missing_id_token","errorMessage":"id_token is missing or empty in the auth.json","messagePattern":"id_token is missing or empty in the auth\\.json","errorType":"exception","errorClass":"CodexAuthFileError","httpStatus":400,"severity":"error","filePath":"src/lib/oauth/utils/codexAuthImport.ts","lineNumber":132,"sourceCode":"  const doc = toRecord(raw);\n\n  // Codex CLI no longer writes auth_mode in auth.json (only OmniRoute's own export\n  // includes it). Accept both formats as long as the required tokens are present.\n  if (doc.auth_mode !== undefined && doc.auth_mode !== null && doc.auth_mode !== \"chatgpt\") {\n    throw new CodexAuthFileError(\n      \"Not a Codex auth.json — unexpected auth_mode value\",\n      400,\n      \"invalid_auth_file\"\n    );\n  }\n\n  const tokens = toRecord(doc.tokens);\n  const idToken = toNonEmptyString(tokens.id_token);\n  const accessToken = toNonEmptyString(tokens.access_token);\n  const refreshToken = toNonEmptyString(tokens.refresh_token);\n\n  if (!idToken) {\n    throw new CodexAuthFileError(\n      \"id_token is missing or empty in the auth.json\",\n      400,\n      \"missing_id_token\"\n    );\n  }\n\n  if (!accessToken) {\n    throw new CodexAuthFileError(\n      \"access_token is missing or empty in the auth.json\",\n      400,\n      \"missing_access_token\"\n    );\n  }\n\n  if (!refreshToken) {\n    throw new CodexAuthFileError(\n      \"refresh_token is missing or empty in the auth.json\",\n      400,","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/utils/codexAuthImport.ts#L114-L150","documentation":"Error \"id_token is missing or empty in the auth.json\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/utils/codexAuthImport.ts:132 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"}