aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-11-14 18:13:01 -0800
committerGitHub <noreply@github.com>2024-11-15 02:13:01 +0000
commit4121f952d18a4c3a3c08ae645af3458ef08b439d (patch)
tree7f45eb33b86005f265d5341a012fb7997685ada7
parent21f7db2124cf42c3c74f7728b658f1bc1030acf1 (diff)
downloadgitea-4121f952d18a4c3a3c08ae645af3458ef08b439d.tar.gz
gitea-4121f952d18a4c3a3c08ae645af3458ef08b439d.zip
Fix oauth2 error handle not return immediately (#32514)
-rw-r--r--routers/web/auth/oauth.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/web/auth/oauth.go b/routers/web/auth/oauth.go
index 730d68051b..75f94de0ed 100644
--- a/routers/web/auth/oauth.go
+++ b/routers/web/auth/oauth.go
@@ -122,6 +122,8 @@ func SignInOAuthCallback(ctx *context.Context) {
}
if err, ok := err.(*go_oauth2.RetrieveError); ok {
ctx.Flash.Error("OAuth2 RetrieveError: "+err.Error(), true)
+ ctx.Redirect(setting.AppSubURL + "/user/login")
+ return
}
ctx.ServerError("UserSignIn", err)
return