diff --git a/google/google.go b/google/google.go index 0465d19..bf5e432 100644 --- a/google/google.go +++ b/google/google.go @@ -198,10 +198,10 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar Ctx: ctx, URL: f.ServiceAccountImpersonationURL, Scopes: params.Scopes, - Ts: oauth2.ReuseTokenSource(nil, ts), + Ts: ts, Delegates: f.Delegates, } - return imp, nil + return oauth2.ReuseTokenSource(nil, imp), nil case "": return nil, errors.New("missing 'type' field in credentials") default: