Harden provider security and build dependencies
This commit is contained in:
1 parent
67d2cf5649
commit
abe578b1a0
10 files changed
+783
-285
No files matched your search
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { interpretPollResponse } from "../../src/main/services/oauth/github-copilot-flow";
|
||||
import { extractAccountId } from "../../src/main/services/oauth/openai-codex-flow";
|
||||
import { readProjectId } from "../../src/main/services/oauth/google-antigravity-flow";
|
||||
import { readProjectId, resolveAntigravityClientSecret } from "../../src/main/services/oauth/google-antigravity-flow";
|
||||
import { generatePkce } from "../../src/main/services/oauth/pkce";
|
||||
import { parseAccessToken, parseAccountToken } from "../../src/main/services/provider-auth-profiles";
|
||||
|
||||
@@ -57,6 +57,16 @@ describe("antigravity project discovery", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("antigravity oauth configuration", () => {
|
||||
test("reads the client secret from runtime environment", () => {
|
||||
expect(resolveAntigravityClientSecret({ AGENTCOMPANY_GOOGLE_ANTIGRAVITY_CLIENT_SECRET: " live-secret " })).toBe("live-secret");
|
||||
});
|
||||
|
||||
test("requires an explicit client secret", () => {
|
||||
expect(() => resolveAntigravityClientSecret({})).toThrow("AGENTCOMPANY_GOOGLE_ANTIGRAVITY_CLIENT_SECRET");
|
||||
});
|
||||
});
|
||||
|
||||
describe("pkce generation", () => {
|
||||
test("produces an S256 challenge for the verifier", () => {
|
||||
const { verifier, challenge } = generatePkce();
|
||||
|
||||
Reference in new issue
Block a user