Skip to content

Commit

Permalink
chore: [WIP] investigating options for sharing authClient across reso…
Browse files Browse the repository at this point in the history
…urces & services
  • Loading branch information
ctreatma committed Jan 29, 2025
1 parent bb3e055 commit d36a8ba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ func (c *Config) Load(ctx context.Context) error {
ClientSecret: c.ClientSecret,
BaseURL: c.BaseURL,
}
authClient = authConfig.New(ctx)
// The `ctx` that is passed in here for the framework
// provider is canceled by the time we need auth. Need
// to test how this change impacts shutting down the provider,
// but this sort of thing may be the "right" way forward
// for now, given the following long-standing issue for the
// oauth2 package:
// https://github.com/golang/oauth2/issues/262
authClient = authConfig.New(context.TODO())
}

authClient.Timeout = c.requestTimeout()
Expand Down

0 comments on commit d36a8ba

Please sign in to comment.