Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

test(voice): match API-key realtime auth response

devv-shayan467c4e928d29
diff --git a/scripts/qa-voice-auth.mjs b/scripts/qa-voice-auth.mjs
index 9c8cf0c1e..800df9598 100644
--- a/scripts/qa-voice-auth.mjs
+++ b/scripts/qa-voice-auth.mjs
@@ -261,7 +261,7 @@ try {
result.mints.every(
(mint) =>
mint.status === 200 &&
- mint.auth === (auth === 'oauth' ? 'codex-oauth' : 'api-key'),
+ mint.auth === (auth === 'oauth' ? 'codex-oauth' : 'env'),
),
);
assert.ok(result.negotiations.every((entry) => entry.status === 201));
diff --git a/src/keySetup.js b/src/keySetup.js
index ec8c1aa94..1186e28a7 100644
--- a/src/keySetup.js
+++ b/src/keySetup.js
@@ -469,7 +469,7 @@ export async function initKeySetup({
throw new Error(
payload.error || 'Could not check ChatGPT sign-in.',
);
- if (response.ok && payload.available) {
+ if (payload.available) {
writeStoredCloudVoiceAuthMode('oauth');
render(status);
say(
@@ -490,7 +490,7 @@ export async function initKeySetup({
});
const loginPayload = await loginResponse.json().catch(() => ({}));
if (lifetime.signal.aborted) return;
- if (!loginResponse.ok && loginResponse.status !== 202) {
+ if (!loginResponse.ok) {
say(
loginPayload.error ||
payload.error ||