0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-04-21 18:04:47 +02:00

Fix oauth2 auth (#33961) (#33962)

Backport #33961 

UI fix is not needed.
This commit is contained in:
wxiaoguang 2025-03-21 20:50:44 +08:00 committed by GitHub
parent 987219ab3c
commit d6cee7c596
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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",