Skip to content

Commit 257ce61

Browse files
GiteaBotlunny
andauthored
Fix oauth2 error handle not return immediately (#32514) (#32516)
Backport #32514 by lunny Co-authored-by: Lunny Xiao <[email protected]>
1 parent 781310d commit 257ce61

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

routers/web/auth/oauth.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,8 @@ func SignInOAuthCallback(ctx *context.Context) {
953953
}
954954
if err, ok := err.(*go_oauth2.RetrieveError); ok {
955955
ctx.Flash.Error("OAuth2 RetrieveError: "+err.Error(), true)
956+
ctx.Redirect(setting.AppSubURL + "/user/login")
957+
return
956958
}
957959
ctx.ServerError("UserSignIn", err)
958960
return

0 commit comments

Comments
 (0)