summaryrefslogtreecommitdiffstats
path: root/routers/user/auth_openid.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/auth_openid.go')
-rw-r--r--routers/user/auth_openid.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/routers/user/auth_openid.go b/routers/user/auth_openid.go
index 7df40bcc98..9fe3424aae 100644
--- a/routers/user/auth_openid.go
+++ b/routers/user/auth_openid.go
@@ -50,12 +50,8 @@ func SignInOpenID(ctx *context.Context) {
}
if isSucceed {
- if len(redirectTo) > 0 {
- ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL)
- ctx.Redirect(redirectTo)
- } else {
- ctx.Redirect(setting.AppSubURL + "/")
- }
+ ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL)
+ ctx.RedirectToFirst(redirectTo)
return
}