|
|
@@ -121,7 +121,7 @@ func checkAutoLogin(ctx *context.Context) bool { |
|
|
|
ctx.ServerError("AutoSignIn", err) |
|
|
|
return true |
|
|
|
} |
|
|
|
|
|
|
|
log.Info("here1...") |
|
|
|
redirectTo := ctx.Query("redirect_to") |
|
|
|
if len(redirectTo) > 0 { |
|
|
|
ctx.SetCookie("redirect_to", redirectTo, 0, setting.AppSubURL, "", setting.SessionConfig.Secure, true) |
|
|
@@ -130,7 +130,7 @@ func checkAutoLogin(ctx *context.Context) bool { |
|
|
|
} |
|
|
|
|
|
|
|
if isSucceed { |
|
|
|
|
|
|
|
log.Info("here2...") |
|
|
|
isCourse := ctx.QueryBool("course") |
|
|
|
|
|
|
|
if redirectTo == "" && isCourse { |
|
|
@@ -138,8 +138,8 @@ func checkAutoLogin(ctx *context.Context) bool { |
|
|
|
redirectToCourse := setting.AppSubURL + "/" + setting.Course.OrgName |
|
|
|
ctx.RedirectToFirst(redirectToCourse) |
|
|
|
} else { |
|
|
|
log.Info("here3...") |
|
|
|
ctx.RedirectToFirst(redirectTo, setting.AppSubURL+string(setting.LandingPageURL)) |
|
|
|
|
|
|
|
} |
|
|
|
return true |
|
|
|
} |
|
|
|