diff --git a/connector/oidc/oidc.go b/connector/oidc/oidc.go index 1ec1bb989e..59ee3f90da 100644 --- a/connector/oidc/oidc.go +++ b/connector/oidc/oidc.go @@ -329,7 +329,7 @@ func (c *oidcConnector) HandleCallback(s connector.Scopes, r *http.Request) (ide } ctx := context.WithValue(r.Context(), oauth2.HTTPClient, c.httpClient) - token := &oauth2.Token{} + var token *oauth2.Token if q.Has("code") { // exchange code to token var opts []oauth2.AuthCodeOption