Skip to content

Commit 6ac04b8

Browse files
lunnyearl-warren
authored andcommitted
Fix oauth2 error handle not return immediately (go-gitea#32514)
(cherry picked from commit 4121f95)
1 parent 004fe29 commit 6ac04b8

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
@@ -1013,6 +1013,8 @@ func SignInOAuthCallback(ctx *context.Context) {
10131013
}
10141014
if err, ok := err.(*go_oauth2.RetrieveError); ok {
10151015
ctx.Flash.Error("OAuth2 RetrieveError: "+err.Error(), true)
1016+
ctx.Redirect(setting.AppSubURL + "/user/login")
1017+
return
10161018
}
10171019
ctx.ServerError("UserSignIn", err)
10181020
return

0 commit comments

Comments
 (0)