From f5d161085c9e45a4c583bae58451de4b645f79bc Mon Sep 17 00:00:00 2001 From: francoismichel Date: Tue, 30 Jul 2024 11:31:52 +0200 Subject: [PATCH] OIDC: fix PKCE random verifier generation (#149) fix a bug in the PKCE process of OpenID Connect The generated verifier had an invalid format. --- auth/openid_connect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/openid_connect.go b/auth/openid_connect.go index e64cd5e..ae1db82 100644 --- a/auth/openid_connect.go +++ b/auth/openid_connect.go @@ -74,7 +74,7 @@ func Connect(ctx context.Context, oidcConfig *OIDCConfig, issuerURL string, doPK return "", fmt.Errorf("error when generating random verifier: %s", err.Error()) } - verifier := string(challengeVerifierBytes[:]) + verifier := oauth2.GenerateVerifier() tokenChannel := make(chan string) mux := http.NewServeMux()