I am creating a "password recovery" system using django 2.0 auth and "Heroku" handles my SSL Certificate. When I send the email containing the password reset link, I get redirected to a google page with an error that looks like this:
"Your connection is not private" NET::ERR_CERT_COMMON_NAME_INVALID
I looked into the error a bit, and I've read that google has deprecated the use of the COMMON_NAME field. How can I change my settings in order to account for this error? Or am I doing something inherently wrong? django say to use a template name password_reset_email.html
and password_reset_complete
to generate the link in email and the password change form destination. Here is my code:
password_reset_email.html
{% autoescape off %}
Dear {{user.first_name}},
You are receiving this message because you have requested to have your password changed for your account on ___.
To initiate the password reset process for your account,
please click the link below:
{{protocol}}://{{domain}}{% url 'password_reset_confirm' uidb64=uid token=token %}
Your username is "{{user.username}}"" in case you've forgotten.
If clicking the link above doesn't work, please copy and paste the URL in a new browser window instead.
Sincerely,
_____
{% endautoescape %}
password_reset_confirm.html
{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% block content %}
{% if validlink %}
<div class='row'>
<div style="background-color:white" class='col-sm-6 col-sm-offset-3'>
<form> {% csrf_token %}
<fieldset class="form-group">
<legend class="border-bottom mb-4">Change Password</legend>
{{form|crispy}}
</fieldset>
<div class="form-group">
<button class="btn btn-success" type="submit">Reset password</button>
</div>
</form>
{% else %}
<div style="background-color: white; color: black;">
<p>
The password reset link was invalid, possibly because it has already been used.
Please request a new password reset.
</p>
</div>
</div>
</div>
{% endif %}
{% endblock content %}
Thank you for your time.