mirror of
1
Fork 0

Fix oauth2 error handle not return immediately (#32514)

(cherry picked from commit 4121f952d18a4c3a3c08ae645af3458ef08b439d)
This commit is contained in:
Lunny Xiao 2024-11-14 18:13:01 -08:00 committed by Earl Warren
parent 004fe296cc
commit 6ac04b8c7d
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
1 changed files with 2 additions and 0 deletions

View File

@ -1013,6 +1013,8 @@ func SignInOAuthCallback(ctx *context.Context) {
} }
if err, ok := err.(*go_oauth2.RetrieveError); ok { if err, ok := err.(*go_oauth2.RetrieveError); ok {
ctx.Flash.Error("OAuth2 RetrieveError: "+err.Error(), true) ctx.Flash.Error("OAuth2 RetrieveError: "+err.Error(), true)
ctx.Redirect(setting.AppSubURL + "/user/login")
return
} }
ctx.ServerError("UserSignIn", err) ctx.ServerError("UserSignIn", err)
return return