电子邮件确认未存储Django allauth [英] Email confirmations are not stored Django allauth

查看:197
本文介绍了电子邮件确认未存储Django allauth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Django allauth与django-rest-auth结合使用。我通过电子邮件确认实现了身份验证。但是现在我意识到它并不能完全正常工作,因为我没有在数据库中存储发送电子邮件确认(在管理员中看不到)。电子邮件确认正在按预期方式发送,并且可以正常运行,只是我在数据库中看不到它们。我缺少什么?

I am using Django allauth with django-rest-auth. I implemented authentication with email confirmation. But now I realize that it does not work exactly as it should since I don't have stored send email confirmation in my DB (can't see them in admin). Email confirmation is being send as it should and it works perfect, just I can't see them in db. What am I missing?

推荐答案

截至版本0.26


默认情况下,电子邮件确认不再存储在数据库中。而是在电子邮件确认邮件中包含一个基于HMAC的密钥,该密钥用于标识要确认的电子邮件地址。

By default, email confirmations are no longer stored in the database. Instead, the email confirmation mail contains an HMAC based key identifying the email address to confirm.

也就是说,不是生成随机密钥并将其存储以供以后查找,allauth从帐户信息中生成一个密钥,然后可以在确认过程中重新生成并进行验证。

That is, instead of generating a random key and storing it for later lookup, allauth generates a key from account information that it can then re-generate and verify during the confirmation process.

这篇关于电子邮件确认未存储Django allauth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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