Skip to content

Commit

Permalink
Fix oauth2 error handle not return immediately (#32514) (#32516)
Browse files Browse the repository at this point in the history
Backport #32514 by lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
  • Loading branch information
GiteaBot and lunny authored Nov 15, 2024
1 parent 781310d commit 257ce61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions routers/web/auth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,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
Expand Down

0 comments on commit 257ce61

Please sign in to comment.