mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
🎨 Add a 'Remember me' checkbox when logging in to save a session https://github.com/siyuan-note/siyuan/pull/14964 https://github.com/siyuan-note/siyuan/issues/13147
This commit is contained in:
@@ -92,6 +92,13 @@ func LoginAuth(c *gin.Context) {
|
||||
ret.Code = 1
|
||||
ret.Msg = Conf.Language(22)
|
||||
logging.LogWarnf("invalid captcha")
|
||||
|
||||
workspaceSession.Captcha = gulu.Rand.String(7) // https://github.com/siyuan-note/siyuan/issues/13147
|
||||
if err := session.Save(c); err != nil {
|
||||
logging.LogErrorf("save session failed: " + err.Error())
|
||||
c.Status(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user