Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be sure to add /admin to your email confirmation url or update your emails in netlify #8

Closed
audetcameron opened this issue May 13, 2021 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@audetcameron
Copy link

Currently, if you just deploy directly to netlify you get the email but it directs you to the index page , where it needs to be /admin?and your query

Should this repo add the netlify widget source to index?

See my comment here
https://answers.netlify.com/t/cms-nuxt-template-starter/37634

I ended up creating new email templates in the back end of netlify , identity ->emails. per the user @tomrutgers
suggestions.

I added these to the /static/emails
and then referenced them in netlify.

confirmation.html

<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>

recovery.html

<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>

invitation.html

<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>

email-change.html

<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>
@Knogobert
Copy link
Owner

Really nice of you to write up such a detailed and helpful issue!

So apparently if I understood this correctly, this is caused because Netlify redirects to the root domain from the emails, where it expects to find <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> imported in <head>.

This is something I removed from the main templates and only added to the /admin/index.html page, as it is not useful for most visitors. It saves them some kilobytes.

But if your implementation requires some more authentication support, I'd suggest following @audetcameron's advice above or @tomrutgers advice here:
https://answers.netlify.com/t/common-issue-netlify-cms-git-gateway-email-not-confirmed/10690

I wont be adding the package to the other pages' <head> for reasons above, but I'll add this to the readme for further availability.

Thank you so much for your contribution @audetcameron ! ⭐

@Knogobert Knogobert self-assigned this May 14, 2021
@Knogobert Knogobert added the documentation Improvements or additions to documentation label May 14, 2021
@tomrutgers
Copy link

You might want to consider adding the email templates to the repo along with some instructions on how to install them though, but that's just my two cents 🙃

@audetcameron
Copy link
Author

You might want to consider adding the email templates to the repo along with some instructions on how to install them though, but that's just my two cents 🙃

@Knogobert if you need an screeshot on where to add/update your email template files in netlify

image

@Knogobert
Copy link
Owner

@tomrutgers @audetcameron , Thanks for your input! I was a bit distracted by other work to do this properly.

I have now updated the readme to be more extensive and also added /static/emails/ templates included so it is easy for activation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants