Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Antigravity: sign in with Google again, not Mistral's browser flow (#6031)

Krishna Dobhal4170749a295e
diff --git a/server/antigravity-account-api.test.ts b/server/antigravity-account-api.test.ts
index 7c036e02d4..cf5c8171f9 100644
--- a/server/antigravity-account-api.test.ts
+++ b/server/antigravity-account-api.test.ts
@@ -84,7 +84,7 @@ it("adds independent accounts, switches a bot between their models, and preserve
expect(created.status, JSON.stringify(created.body)).toBe(201);
const id = created.body.instanceId as string; ids.push(id);
const instance = created.body.instances.find((row: any) => row.instanceId === id);
- expect(instance).toMatchObject({ displayName: displayName.trim(), driverKind: "antigravityAgent", cli, snapshot: { authenticated: false } });
+ expect(instance).toMatchObject({ displayName: displayName.trim(), driverKind: "antigravityAgent", cli, snapshot: { authenticated: false }, authentication: { method: "callback-url" } });
expect(existsSync(tokenPath(id))).toBe(false);
expect(JSON.stringify(instance)).not.toMatch(/synthetic-do-not-copy|refresh_token|client_secret/);
}
diff --git a/server/harness/registry.ts b/server/harness/registry.ts
index c3eb83b9b5..b41b39e458 100644
--- a/server/harness/registry.ts
+++ b/server/harness/registry.ts
@@ -561,7 +561,7 @@ export class ProviderRegistry {
? "paste-code" as const // a link to open, then a code pasted back (Claude)
: inst.getAuthentication
? "device-code" as const // a code to enter at the provider's page (Codex)
- : "browser" as const), // a link and a callback URL (managed engines)
+ : "callback-url" as const), // a link and a callback URL (managed engines)
signOut: inst.signOut !== undefined,
}
: undefined,
diff --git a/src/components/EngineSetup.antigravity.test.ts b/src/components/EngineSetup.antigravity.test.ts
index 8e03606138..41fdad12a3 100644
--- a/src/components/EngineSetup.antigravity.test.ts
+++ b/src/components/EngineSetup.antigravity.test.ts
@@ -13,6 +13,7 @@ const antigravity: InstanceInfo = {
models: { default: "gemini", options: [] },
snapshot: { state: "available", authenticated: false, version: "1.1.1" },
install: { managed: { label: "Install official Antigravity", downloadBytes: 1024 } },
+ authentication: { method: "callback-url", signOut: true },
};
let host: HTMLDivElement;
@@ -55,3 +56,11 @@ it("opens it on a desktop paired to another computer's server", async () => {
it("keeps it folded on the person's own computer, where the redirect lands by itself", async () => {
expect((await startSignIn(false, { remoteClient: { active: false } })).open).toBe(false);
});
+
+it("names Google on the sign-in card, never another provider", () => {
+ vi.stubGlobal("ogb", { platform: "linux", remoteClient: { active: false } });
+ const store = { state: { config: {} }, dispatch: vi.fn(), refreshInstances: vi.fn(async () => {}), refreshModels: vi.fn(async () => {}) } as unknown as ReturnType<typeof useStore>;
+ flushSync(() => root.render(createElement(BotEditorStore, { value: store, children: createElement(EngineSetup, { instance: antigravity }) })));
+ expect(host.textContent).toContain("Sign in with Google");
+ expect(host.textContent).not.toContain("Mistral");
+});
diff --git a/src/components/EnginesSettings.test.ts b/src/components/EnginesSettings.test.ts
index 97351297e0..d8730c9cd7 100644
--- a/src/components/EnginesSettings.test.ts
+++ b/src/components/EnginesSettings.test.ts
@@ -196,7 +196,7 @@ describe("Settings → Engines → setup cards", () => {
const account = (instanceId: string, authenticated: boolean, signOut: boolean): InstanceInfo => ({
instanceId, driverKind: "antigravityAgent", displayName: "Google account", cliDefault: "agy_acp_server",
snapshot: { state: "available", authenticated }, models: { default: "gemini", options: [] },
- authentication: { method: "browser", signOut },
+ authentication: { method: "callback-url", signOut },
});
fixture.instances = [account("antigravity", true, true)];
expect(renderToStaticMarkup(createElement(EnginesSettings))).toContain(">Sign out<");
diff --git a/src/state/store.tsx b/src/state/store.tsx
index 45fcf0ba13..c018d808ba 100644
--- a/src/state/store.tsx
+++ b/src/state/store.tsx
@@ -453,7 +453,7 @@ export interface InstanceInfo extends InstanceEndpointInfo {
backgroundText?: boolean;
};
access?: "subscription" | "custom" | "api";
- authentication?: { method: "device-code" | "paste-code" | "browser" | "browser-pkce"; signOut?: boolean };
+ authentication?: { method: "device-code" | "paste-code" | "browser" | "browser-pkce" | "callback-url"; signOut?: boolean };
install?: EngineInstall;
cli?: string;
cliDefault?: string;