From ce9a8ecf3d13c142353b60a18956725263a8f7c6 Mon Sep 17 00:00:00 2001 From: Fabiennne Date: Mon, 21 Sep 2020 14:53:22 +0200 Subject: [PATCH] feat: prompt option --- pkg/rp/relaying_party.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/rp/relaying_party.go b/pkg/rp/relaying_party.go index 8aba443..4634fbd 100644 --- a/pkg/rp/relaying_party.go +++ b/pkg/rp/relaying_party.go @@ -98,6 +98,15 @@ func WithCodeChallenge(codeChallenge string) AuthURLOpt { } } +//WithPrompt sets the `prompt` params in the auth request +func WithPrompt(prompt string) AuthURLOpt { + return func() []oauth2.AuthCodeOption { + return []oauth2.AuthCodeOption{ + oauth2.SetAuthURLParam("prompt", prompt), + } + } +} + type CodeExchangeOpt func() []oauth2.AuthCodeOption //WithCodeVerifier sets the `code_verifier` param in the token request