Skip to content

Commit

Permalink
Added key and uid fields to the reset password form (#554)
Browse files Browse the repository at this point in the history
* Added key and uid fields back to the reset password form

* Fixed wrong variable name `key` to `token`

* Fixed wrong encoding for uid

I am actually brain dead and forgot the encoding
  • Loading branch information
Explie committed Nov 26, 2023
1 parent ae093a4 commit 23f097c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dj_rest_auth/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,15 @@ def save(self, request, **kwargs):
# send the password reset email
url_generator = kwargs.get('url_generator', default_url_generator)
url = url_generator(request, user, temp_key)
uid = user_pk_to_url_str(user)

context = {
'current_site': current_site,
'user': user,
'password_reset_url': url,
'request': request,
'token': temp_key,
'uid': uid,
}
if (
allauth_account_settings.AUTHENTICATION_METHOD
Expand Down

0 comments on commit 23f097c

Please sign in to comment.