Error NET::ERR_CERT_COMMON_NAME_INVALID from google when using Django 2.0 for password recovery through email
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.
django django-authentication django-2.0 password-recovery
add a comment |
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.
django django-authentication django-2.0 password-recovery
I believe this is an issue with your SSL certificate
– Nick Chapman
Jan 2 at 20:50
Heroku handles my SSL certificate. I would assume such a large platform would not have this type of problem, no?
– juju
Jan 2 at 20:54
add a comment |
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.
django django-authentication django-2.0 password-recovery
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.
django django-authentication django-2.0 password-recovery
django django-authentication django-2.0 password-recovery
edited Jan 2 at 20:54
juju
asked Jan 2 at 20:49
jujujuju
1469
1469
I believe this is an issue with your SSL certificate
– Nick Chapman
Jan 2 at 20:50
Heroku handles my SSL certificate. I would assume such a large platform would not have this type of problem, no?
– juju
Jan 2 at 20:54
add a comment |
I believe this is an issue with your SSL certificate
– Nick Chapman
Jan 2 at 20:50
Heroku handles my SSL certificate. I would assume such a large platform would not have this type of problem, no?
– juju
Jan 2 at 20:54
I believe this is an issue with your SSL certificate
– Nick Chapman
Jan 2 at 20:50
I believe this is an issue with your SSL certificate
– Nick Chapman
Jan 2 at 20:50
Heroku handles my SSL certificate. I would assume such a large platform would not have this type of problem, no?
– juju
Jan 2 at 20:54
Heroku handles my SSL certificate. I would assume such a large platform would not have this type of problem, no?
– juju
Jan 2 at 20:54
add a comment |
1 Answer
1
active
oldest
votes
I had the incorrect domain name in my admin.site domain names. I forgot to include the full domain name including www. in front of the website name so it couldn't be matched to the one website name in the password reset email.
add a comment |
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54012994%2ferror-neterr-cert-common-name-invalid-from-google-when-using-django-2-0-for-pa%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I had the incorrect domain name in my admin.site domain names. I forgot to include the full domain name including www. in front of the website name so it couldn't be matched to the one website name in the password reset email.
add a comment |
I had the incorrect domain name in my admin.site domain names. I forgot to include the full domain name including www. in front of the website name so it couldn't be matched to the one website name in the password reset email.
add a comment |
I had the incorrect domain name in my admin.site domain names. I forgot to include the full domain name including www. in front of the website name so it couldn't be matched to the one website name in the password reset email.
I had the incorrect domain name in my admin.site domain names. I forgot to include the full domain name including www. in front of the website name so it couldn't be matched to the one website name in the password reset email.
answered Jan 2 at 21:07
jujujuju
1469
1469
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54012994%2ferror-neterr-cert-common-name-invalid-from-google-when-using-django-2-0-for-pa%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I believe this is an issue with your SSL certificate
– Nick Chapman
Jan 2 at 20:50
Heroku handles my SSL certificate. I would assume such a large platform would not have this type of problem, no?
– juju
Jan 2 at 20:54