烧瓶登录会话被破坏每个Apache重新启动 [英] flask-login session gets destroyed on every apache restart
问题描述
我正在使用flask-login https://github.com/maxcountryman/flask-login并记住 login_user 字段似乎不起作用。
I am using flask-login https://github.com/maxcountryman/flask-login and the field remember in login_user does not seem to work.
在每次重新启动apache之后会话都会被破坏。记住这个字段应该处理这个事情,甚至会话值也被破坏。这真是令人沮丧...任何人都知道解决方案,请平..谢谢
i使用login_user作为
The session gets destroyed after every restart of the apache ..ideally the remember field should take care of this.. even the session values gets destroyed. this is really frustrating... anyone knowing the solution please ping .. thanks i am using login_user as
login_user(user, remember=True)
推荐答案
这个问题,你必须正确编写 user_loader 功能。
If anyone is suffering with this problem, you have to write the function user_loader properly.
@login_manager.user_loader
def load_user(id):
return "get the user properly and create the usermixin object"
这篇关于烧瓶登录会话被破坏每个Apache重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!