login users based on token cookie

This commit is contained in:
bergquist
2019-01-16 14:53:59 +01:00
parent 8764fb5aa6
commit aba6148c43
6 changed files with 95 additions and 61 deletions

View File

@@ -42,10 +42,10 @@ func (hs *HTTPServer) LoginView(c *m.ReqContext) {
return
}
if !hs.tryLoginUsingRememberCookie(c) {
c.HTML(200, ViewIndex, viewData)
return
}
//if !hs.tryLoginUsingRememberCookie(c) {
c.HTML(200, ViewIndex, viewData)
return
//}
if redirectTo, _ := url.QueryUnescape(c.GetCookie("redirect_to")); len(redirectTo) > 0 {
c.SetCookie("redirect_to", "", -1, setting.AppSubUrl+"/")