Skip to content

Commit

Permalink
when requesting offline_access, set prompt to consent
Browse files Browse the repository at this point in the history
  • Loading branch information
BeryJu committed Jan 1, 2024
1 parent 9afb7f0 commit 55bf982
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ func (c *OIDCClient) oauthInit(w http.ResponseWriter, r *http.Request) {
return
}
opts := []oauth2.AuthCodeOption{}
if slices.Contains(c.config.Scopes, "offline_access") {
opts = append(opts, oauth2.ApprovalForce)
}
if c.doRefreshChecks {
opts = append(opts, oauth2.AccessTypeOffline)
}
Expand Down

0 comments on commit 55bf982

Please sign in to comment.