Skip to content

Commit 429e69b

Browse files
committed
test
1 parent 7100ab3 commit 429e69b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/providers/common/common.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ func Configure() {
3232

3333
// PrepareTokensAndClient setup the client, usually for a UserInfo request
3434
func PrepareTokensAndClient(r *http.Request, ptokens *structs.PTokens, setProviderToken bool, opts ...oauth2.AuthCodeOption) (*http.Client, *oauth2.Token, error) {
35-
providerToken, err := cfg.OAuthClient.Exchange(context.TODO(), r.URL.Query().Get("code"), opts...)
35+
sslClient := ClientWithCert(&http.Client{})
36+
ctx := context.WithValue(context.TODO(), oauth2.HTTPClient, sslClient)
37+
providerToken, err := cfg.OAuthClient.Exchange(ctx, r.URL.Query().Get("code"), opts...)
3638
log.Debugf("----->PrepareTokensAndClient 1")
3739
if err != nil {
3840
return nil, nil, err

0 commit comments

Comments
 (0)