Q93: disconnect erases the secret here and revokes at the provider where it can
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
06eb2ce8dc
commit
7cd386a38c
15 files changed
+257
-29
No files matched your search
@@ -102,6 +102,16 @@ async function discoverProject(accessToken: string, cancel?: AbortSignal): Promi
|
||||
throw new Error("Antigravity project discovery failed.");
|
||||
}
|
||||
|
||||
/** Revokes the sign-in at Google; revoking the refresh token also ends its access tokens. */
|
||||
export async function revokeAntigravity(refreshToken: string): Promise<void> {
|
||||
const { response, text } = await oauthFetch("https://oauth2.googleapis.com/revoke", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
body: new URLSearchParams({ token: refreshToken }),
|
||||
});
|
||||
if (!response.ok) throw httpFailure(`Google revocation failed: ${response.status} ${text}`, response, text);
|
||||
}
|
||||
|
||||
/** Refresh an expired Antigravity access token, retaining the project id. */
|
||||
export async function refreshAntigravity(refreshToken: string, projectId: string, clientSecret: string): Promise<OAuthCredentials> {
|
||||
const { response, text } = await oauthFetch(TOKEN_URL, {
|
||||
|
||||
Reference in new issue
Block a user