Flask-Security重置密码 [英] Flask-Security reset password
问题描述
我正在尝试在项目上使用Flask-Security.我已经做出了可能在SO上进行搜索,但是我只是找不到简单实现重置密码功能的方法.我只是不了解在这种情况下如何使用flask-security APi.
I'm trying to use Flask-Security on a project. I've made may search on SO but I just can't find a way to simply implement a the reset password functionality. I just don't understand how to use the flask-security APi in this case.
我注意到所有模板都可以在其github上找到,我还检查了源代码,但这就像是一个谜.
I notice that all the template can be found on their github, I also check the source code but it's like a mystery.
如果您有一些很好的技巧,建议或示例来实现重置密码,那将非常好.
If you have some good tips, advice or example on how to implement reset password it would be really kind.
对不起,我的英语不好
推荐答案
您需要打开Flask-Security的 SECURITY_RECOVERABLE
设置.具体执行方式取决于您的代码,但这取决于
You need to turn on Flask-Security's SECURITY_RECOVERABLE
setting. How exactly you do that depends on your code, but it's something along the lines of
app.config['SECURITY_RECOVERABLE'] = True
这将打开密码重置页面的链接.
这篇关于Flask-Security重置密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!