Missing Netlify Identity modal on password reset

Ok this is the last repo updated
https://gitlab.com/ferreiraf/317tz.git

And the netlify project
https://affectionate-euler-ff5a74.netlify.app

So now i have the widget code in my admin page.
I delete this wigdet from my home page (includes/layouts/default.njk).
In default.njk just remains this netlify script in the body:
<script> if (window.netlifyIdentity) { window.netlifyIdentity.on("init", user => { if (!user) { window.netlifyIdentity.on("login", () => { document.location.href = "/admin/"; }); } }); } </script>

Yes i have in my private project.
Not in the public one.

You need to enable identity with any site with the widget in.

ok.

What i have done since your last post

in the public version of the project:

  • site settings> build and deploy> build settings> re-link to the public repo (317tz)

  • Identity enable Netlify UI

  • Identity enable Git Gateway > edit settings> create access token > save

  • Identity Registration preferences> invite only

  • Identity Send reset password email

And for now the result is the same since this morning,

  • i receive the - Follow this link to reset the password for your user - message
  • i click the link
  • My home page appear, and, at the end of the url the recovery token:
    https://affectionate-euler-ff5a74.netlify.app/#recovery_token=0d-zbS7Ik65jWILt56vcTA

But no modal to introduce a new pass.

Yep, there’s still no identity widget found. I’m trying to find a .njk file in your repo that acts like a head with all the global scripts for your site in it. Could you name a file that is global?

site> includes> layouts> default and new-default.njk
i guess

I remember the netlify widget to appear in my lighthouse tests.
And this elements made part of the render blocking ressources…

In that file, the Identity widget is commented out.

Yes it is.
It was the original location of the netlify widget.
After the Tom intervention i decided to try the widget in the admin page

Do i need to delete the comment ?

I think Tom assumed that this was an issue regarding #netlify-cms, you don’t need an admin page for your use case.

Try adding this:

<link rel="dns-prefetch" href="https://identity.netlify.com">
  <script async="async" src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>

to the <head> tag in includes/layouts/default.njk

I would suggest putting it above the other scripts because sometimes that can cause an issue. You shouldn’t need {# include netlify identity script #} since I too use Eleventy and I’ve never seen a declaration of a script like this before.

OK let’s try this,
i will undo the Tom admin page instructions.
and follow your yours

be back asap

1 Like

This is how to write a comment in Nunjucks template.
It’s not a declaration, i guess.
https://mozilla.github.io/nunjucks/templating.html#comments

1 Like

Have you added the scripts to the head?

Not yet, 5 more minutes

It’s in the head, right ?

Also, the script is commented out with html aswell as nunjucks <!--, this could be a reason why the issue is happening.
image

Yep, in the head.

ok i’ll clean the all thing

OK,

i just made the changes and cleaning all.
and git push the all thing in the public repo.

Do you see?

Yep, I see the commit. Tell me when the site has been deployed.

To be clear, is this the URL that we are looking at:

https://affectionate-euler-ff5a74.netlify.app
`https://affectionate-euler-ff5a74.netlify.app`

Yes
This is the Public Repo

Has the site been deployed?

Yes the site been deployed 7min ago