title: Django Rest Auth - UID invalid value error
body: <p>I have a DRF server, and I've been trying to send a password reset email, using the <code>PasswordResetForm</code>.</p>
  <p>I receive an email as expected, though when trying to send a reset the password, I receive:</p>
  <pre><code>{
      &quot;uid&quot;: [
          &quot;Invalid value&quot;
      ]
  }
  </code></pre>
  <p>After some investigation, I've found that in Django's <code>PasswordResetConfirmSerializer</code>'s file, there is a conditional import which is responsible for the issue - I'm using <code>allauth</code> and so <strong>it imports the wrong <code>uid_decoder</code> module</strong> (it works using the other module):</p>
  <pre><code># this imports the wrong uid_decoder
  if 'allauth' in settings.INSTALLED_APPS:
      from allauth.account.forms import default_token_generator
      from allauth.account.utils import url_str_to_user_pk as uid_decoder
  else:
      from django.contrib.auth.tokens import default_token_generator 
      from django.utils.http import urlsafe_base64_decode as uid_decoder
  
  </code></pre>
  <p><strong>Is there a better way to handle the issue than editing the dj_rest_auth file?</strong></p>
  <p>Thanks!</p>
  <p><em>Email send code, if needed:</em></p>
  <pre><code>from django.conf import settings
  from django.contrib.auth.forms import PasswordResetForm
  
  
  def send_user_invite(email):
      # send invitation to reset password &amp; join the platform
      form_options = {
          &quot;use_https&quot;: True,
          &quot;from_email&quot;: getattr(settings, &quot;DEFAULT_FROM_EMAIL&quot;),
          # &quot;request&quot;: request,
          &quot;subject_template_name&quot;: &quot;registration/password_reset_subject.txt&quot;,
          &quot;email_template_name&quot;: &quot;users/invite_with_password_reset.html&quot;,
          &quot;extra_email_context&quot;: {&quot;reset_base_url&quot;: settings.RESET_BASE_URL},
      }
      form = PasswordResetForm(data={&quot;email&quot;: email})
      if form.is_valid():
          form.save(**form_options)
  
  </code></pre>