Fix oauth2 s256 (#36462) (#36477)

Backport #36462 by @lunny

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot
2026-01-28 12:37:39 -08:00
committed by GitHub
co-authored by Lunny Xiao
parent eb95bbc1fd
commit 750649c1ef
2 changed files with 41 additions and 2 deletions
+1 -2
View File
@@ -230,8 +230,7 @@ func AuthorizeOAuth(ctx *context.Context) {
// pkce support
switch form.CodeChallengeMethod {
case "S256":
case "plain":
case "S256", "plain":
if err := ctx.Session.Set("CodeChallengeMethod", form.CodeChallengeMethod); err != nil {
handleAuthorizeError(ctx, AuthorizeError{
ErrorCode: ErrorCodeServerError,