fix: parse max_age and prompt correctly (and change scope type)

This commit is contained in:
Livio Amstutz 2021-06-14 11:18:28 +02:00
parent 3e336a4075
commit 9721fc8882
16 changed files with 98 additions and 85 deletions

View file

@ -430,10 +430,10 @@ func WithCodeChallenge(codeChallenge string) AuthURLOpt {
}
//WithPrompt sets the `prompt` params in the auth request
func WithPrompt(prompt oidc.Prompt) AuthURLOpt {
func WithPrompt(prompt ...string) AuthURLOpt {
return func() []oauth2.AuthCodeOption {
return []oauth2.AuthCodeOption{
oauth2.SetAuthURLParam("prompt", string(prompt)),
oauth2.SetAuthURLParam("prompt", oidc.SpaceDelimitedArray(prompt).Encode()),
}
}
}