Skip to content

Commit

Permalink
golang/oauth2: fixxed nil pointer reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Dainismo committed Nov 11, 2023
1 parent 0fa29c2 commit b1b9cc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,11 @@ func (s *reuseTokenSource) Token() (*Token, error) {
return nil, err
}
t.expiryDelta = s.expiryDelta
t.OnTokenRefresh = s.t.OnTokenRefresh
s.t = t
if t.OnTokenRefresh != nil {
if s.t.OnTokenRefresh != nil {
t.OnTokenRefresh = s.t.OnTokenRefresh
t.OnTokenRefresh(*t)
}
s.t = t
return t, nil
}

Expand Down

0 comments on commit b1b9cc6

Please sign in to comment.