From 0676700b7f9d31c3fb11fe14d2fb289e8664b17f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 14 Nov 2024 12:42:54 -0800 Subject: [PATCH] Fix oauth2 error handle not return immediately --- routers/web/auth/oauth.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routers/web/auth/oauth.go b/routers/web/auth/oauth.go index 730d68051be38..75f94de0edad7 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