Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Force approval
Browse files Browse the repository at this point in the history
googleapis/oauth2client#453

Note we may need to use prompt=consent instead.
  • Loading branch information
Nic Cope committed May 6, 2017
1 parent 90f7a3f commit ecc49c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kuberos.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func NewHandlers(c *oauth2.Config, e extractor.OIDC, ho ...Option) (*Handlers, e
log: l,
cfg: c,
e: e,
oo: []oauth2.AuthCodeOption{oauth2.AccessTypeOffline},
oo: []oauth2.AuthCodeOption{oauth2.ApprovalForce, oauth2.AccessTypeOffline},
state: defaultStateFn([]byte(c.ClientSecret)),
httpClient: http.DefaultClient,
endpoint: &url.URL{Path: DefaultKubeCfgEndpoint},
Expand All @@ -201,7 +201,7 @@ func NewHandlers(c *oauth2.Config, e extractor.OIDC, ho ...Option) (*Handlers, e
for _, s := range c.Scopes {
// ...Unless we find an offline scope
if s == oidc.ScopeOfflineAccess {
h.oo = []oauth2.AuthCodeOption{}
h.oo = []oauth2.AuthCodeOption{oauth2.ApprovalForce}
}
}

Expand Down

0 comments on commit ecc49c5

Please sign in to comment.