MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / fetchGoogleUserInfo

Function fetchGoogleUserInfo

apps/web/src/lib/integrations/google-service.ts:87–100  ·  view source on GitHub ↗
(accessToken: string)

Source from the content-addressed store, hash-verified

85}
86
87async function fetchGoogleUserInfo(accessToken: string): Promise<GoogleUserInfoResponse> {
88 const response = await fetch(GOOGLE_USERINFO_ENDPOINT, {
89 headers: {
90 Authorization: `Bearer ${accessToken}`,
91 },
92 });
93
94 if (!response.ok) {
95 const errorText = await response.text();
96 throw new Error(`Google userinfo request failed: ${errorText}`);
97 }
98
99 return (await response.json()) as GoogleUserInfoResponse;
100}
101
102export async function exchangeGoogleOAuthCode(
103 code: string,

Callers 1

exchangeGoogleOAuthCodeFunction · 0.85

Calls 3

textMethod · 0.65
jsonMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected