Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Antigravity shows the signed-in Google account email #38097

OpenKitsuneKode(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/38097/headopened View on GitHub

Showing 10 changed files with 59 additions and 0 deletions (loading 8).

x
0 of 10 viewed, 10 left
50 additions and 0 deletionsapps/server/src/provider/Drivers/AntigravityDriver.test.tsModified
View file
@@ -703,4 +703,54 @@
expect(yield* fs.exists(legacyRoot)).toBe(false);
}),
+​
+ it.effect.skipIf(windowsHost)(
+ "reports the stored Google email only for personal OAuth instances",
+ () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const writeStoredToken = (profileDirectory: string, email: string) =>
+ Effect.gen(function* () {
+ const acpDir = path.join(profileDirectory, "antigravity-acp");
+ yield* fs.makeDirectory(acpDir, { recursive: true });
+ yield* fs.writeFileString(
+ path.join(acpDir, "antigravity-oauth-token"),
+ JSON.stringify({ id_token_email: email }),
+ );
+ });
+​
+ const personal = yield* makeHarness({ config: { authMethod: "oauth-personal" } });
+ yield* writeStoredToken(personal.profileDirectory, "personal@example.com");
+ expect((yield* personal.instance.snapshot.refresh).auth).toMatchObject({
+ status: "unknown",
+ type: "oauth-personal",
+ email: "personal@example.com",
+ });
+ yield* personal.refresh();
+ expect((yield* personal.instance.snapshot.getSnapshot).auth).toMatchObject({