We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7100ab3 commit 429e69bCopy full SHA for 429e69b
1 file changed
pkg/providers/common/common.go
@@ -32,7 +32,9 @@ func Configure() {
32
33
// PrepareTokensAndClient setup the client, usually for a UserInfo request
34
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...)
+ 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...)
38
log.Debugf("----->PrepareTokensAndClient 1")
39
if err != nil {
40
return nil, nil, err
0 commit comments