烧瓶登录会话被破坏每个Apache重新启动 [英] flask-login session gets destroyed on every apache restart

查看:169
本文介绍了烧瓶登录会话被破坏每个Apache重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆