MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / fetchGoogleUserInfo

Function fetchGoogleUserInfo

internal/auth/auth.go:538–551  ·  view source on GitHub ↗
(ctx context.Context, cfg *oauth2.Config, token *oauth2.Token, userInfoURL string)

Source from the content-addressed store, hash-verified

536}
537
538func fetchGoogleUserInfo(ctx context.Context, cfg *oauth2.Config, token *oauth2.Token, userInfoURL string) (*googleUserInfo, error) {
539 client := cfg.Client(ctx, token)
540 resp, err := client.Get(userInfoURL)
541 if err != nil {
542 return nil, err
543 }
544 defer resp.Body.Close()
545
546 var info googleUserInfo
547 if err := json.NewDecoder(resp.Body).Decode(&info); err != nil {
548 return nil, err
549 }
550 return &info, nil
551}
552
553// HandleDashboardStats returns the workspace-level aggregates for the
554// redesigned dashboard's stats strip. Accepts ?window=N (days) to vary

Callers 1

HandleCallbackMethod · 0.85

Calls 2

GetMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected