django-allauth
django-allauth copied to clipboard
feat(accounts): add key to password reset template
Currently, the password reset email template gets passed the full URL to the password reset endpoint. However, in some scenarios, this endpoint isn't the location where the user will actually perform the password reset data entry, for example if Django only hosts an API backend and the user-facing part instead is implemented via a SPA.
To make it easier to integrate such setups with allauth, this change additionally passes the uid and key to the password reset email template. This provides full control to the template author to generate their own password reset links and support a split frontend/backend.
Note the similar use-case in https://github.com/pennersr/django-allauth/pull/3081; I believe the implementation provided here is more generic as the path variable can now be reconstructed in the template via reverse FYI @jhhayashi
Makes sense to me. I'll close my PR in favor of this one
Coverage: 91.689% (+0.4%) from 91.338% when pulling b45d5b3eddffa14ed2605fdb32b0fea1e1c825ec on c-w:reset-password-uid-key into 11110780cd6338fb18e36b2485b3643f3ea1e3a3 on pennersr:master.
@pennersr Any chance we could get this PR reviewed? Thanks in advance!
TYSM for the merge!