[Common Issue] Netlify CMS & Git Gateway - Email not confirmed

Great! You’ve set up a site using Netlify CMS and Git Gateway. You’ve followed the Identity docs instructions and set up Git Gateway. You’ve invited some users and opened the invitation link from the generated emails but as you try to log in you get the following error message:

Email not confirmed


So what’s happening? You probably added the identity widget to the /admin/ page of your site. By default, however, the identity emails point to the root of your website. Time to do something about it! Here’s two solutions:

  1. Add the identity widget to your homepage <head>. Upside of this method is that it’s fast and easy, no other configuration needed. The downside is that all of your users are downloading the widget while they might not need it. That’s kb’s wasted. Unless you’re using Netlify Identity for something else than the authentication of CMS users, I recommend you utilize solution #2.

  2. Change the invitation emails! This takes a bit more time, but it’s probably the cleanest solution. You already have the identity widget loaded at your admin/ page, so you might as well have your users confirm their email there. Learn how to update your invitation emails here: https://docs.netlify.com/visitor-access/identity/identity-generated-emails/#email-templates

For Netlify CMS, these are the templates to use. You will have to tell you SSG not to add a layout to these templates (there shouldn’t be any <html>, <head> or <body> tags for these pages).


<h2>Confirm your signup</h2>

<p>Follow this link to confirm your user:</p>
<p><a href="{{ .SiteURL }}/admin/#confirmation_token={{ .Token }}">Confirm your mail</a></p>


<h2>Reset Password</h2>

<p>Follow this link to reset the password for your user:</p>
<p><a href="{{ .SiteURL }}/admin/#recovery_token={{ .Token }}">Reset Password</a></p>


<h2>You have been invited</h2>

<p>You have been invited to create a user on {{ .SiteURL }}. Follow this link to accept the invite:</p>
<p><a href="{{ .SiteURL }}/admin/#invite_token={{ .Token }}">Accept the invite</a></p>


<h2>Confirm Change of Email</h2>

<p>Follow this link to confirm the update of your email from {{ .Email }} to {{ .NewEmail }}:</p>
<p><a href="{{ .SiteURL }}/admin/#email_change_token={{ .Token }}">Change Email</a></p>

Try resending the confirmation email from the admin panel. If you do encounter any problems after you have made these changes, please open a new post on this forum and someone will try to help you troubleshoot the issue.


This is fantastic information, @tomrutgers, and we cannot thank you enough for creating this! :smiley:

1 Like