From d6cee7c59640b29fe798fa80a49340ef5711d89f Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 21 Mar 2025 20:50:44 +0800 Subject: [PATCH] Fix oauth2 auth (#33961) (#33962) Backport #33961 UI fix is not needed. --- routers/web/auth/oauth2_provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/auth/oauth2_provider.go b/routers/web/auth/oauth2_provider.go index 1aebc047bd..5dbb529e0a 100644 --- a/routers/web/auth/oauth2_provider.go +++ b/routers/web/auth/oauth2_provider.go @@ -248,7 +248,7 @@ func AuthorizeOAuth(ctx *context.Context) { }, form.RedirectURI) return } - if err := ctx.Session.Set("CodeChallengeMethod", form.CodeChallenge); err != nil { + if err := ctx.Session.Set("CodeChallenge", form.CodeChallenge); err != nil { handleAuthorizeError(ctx, AuthorizeError{ ErrorCode: ErrorCodeServerError, ErrorDescription: "cannot set code challenge",