Skip to content

Commit a60f3cb

Browse files
authored
Avoid direct use of http.DefaultClient (#163)
* Avoid direct use of http.DefaultClient * Updated changelog
1 parent 1d2a52c commit a60f3cb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Unreleased
22

3+
- [fixed] Fixing a regression introduced in 3.2.0, where `VerifyIDToken()`
4+
cannot be used in App Engine.
5+
36
# v3.2.0
47

58
- [added] Implemented the ability to create custom tokens without

auth/auth.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ import (
1919
"encoding/json"
2020
"errors"
2121
"fmt"
22-
"net/http"
2322
"strings"
2423

24+
"google.golang.org/api/option"
25+
2526
"golang.org/x/net/context"
2627

2728
"firebase.google.com/go/internal"
@@ -127,9 +128,13 @@ func NewClient(ctx context.Context, conf *internal.AuthConfig) (*Client, error)
127128
return nil, err
128129
}
129130

131+
noAuthHTTPClient, _, err := transport.NewHTTPClient(ctx, option.WithoutAuthentication())
132+
if err != nil {
133+
return nil, err
134+
}
130135
return &Client{
131136
is: is,
132-
keySource: newHTTPKeySource(idTokenCertURL, http.DefaultClient),
137+
keySource: newHTTPKeySource(idTokenCertURL, noAuthHTTPClient),
133138
projectID: conf.ProjectID,
134139
signer: signer,
135140
version: "Go/Admin/" + conf.Version,

0 commit comments

Comments
 (0)