django - 密码重置期间生成的 DJANGO token 存储在哪里

标签 django django-rest-framework django-rest-auth

当我请求“忘记密码”功能时,我试图访问生成的 token (在数据库表中),但我似乎找不到它。

我正在使用django 1.10rest_frameworkdjango-rest-auth。我已经检查了 authtoken_token 以及 account_emailconfirmation 表,但没有成功。

在 github 中,源代码在 python 中将其称为 token_model 我认为 https://github.com/Tivix/django-rest-auth/blob/master/rest_auth/utils.py

最佳答案

除了用户电子邮件之外,它不会存储在任何地方。当用户单击由 PasswordResetTokenGenerator 解析提供的链接 token 时来获取时间戳。使用此时间戳 PasswordResetTokenGenerator 生成新 token 。并将这个新 token 与用户提供的进行比较,请参阅check_token方法。

关于django - 密码重置期间生成的 DJANGO token 存储在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48123017/

相关文章:

python - 检索 ManyToManyField 的类

python - 如何从下拉列表中选择多个值到views.py

python - Django 休息框架 : using ModelViewSet to get a list of instances by their PKs

python - 代码更新后Django + Daphne 热重载

Django 休息注册

ios - django-allauth 中多个设备的访问 token 授权

django - 未找到 'account_email_verification_sent' 的反向。 'account_email_verification_sent' 不是有效的 View 函数或模式名称

java - Django 更新到 1.6 后,Android http post 请求返回 403

android - 使用 Django 的 Android 应用程序的 Facebook 谷歌身份验证

python - 从管理界面保存时未触发 Django 信号