Open codemzy opened 2 years ago
I can confirm that the logout function is not working. Fore gated content, since netlify identity is the only integration allowed, it is really important to get this bug fix imho.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
It is now June 27, 2023 and it still is NOT working. When I click on it the screen blinks but I am still logged-in.
@GerBreOwn If you want this bug solved sooner rather than later, I suggest that you open a pull request.
Hello, i'd like to add that this issue also occurs with Opera as Browser and using Decap CMS. I'm importing the CMS using the CDN.
<head>
...
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js" is:inline></script>
</head>
<body>
...
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js" is:inline></script>
</body>
the issue occurs in the exact same way reported above. As a a workaround i inserted a script tag at the end of the page with the following code
<script is:inline>
if (window.netlifyIdentity)
window.netlifyIdentity.on("logout", () => {
window.netlifyIdentity.close();
document.location.href = "/";
});
</script>
Hello, i'd like to add that this issue also occurs with Opera as Browser and using Decap CMS. I'm importing the CMS using the CDN.
<head> ... <script src="https://identity.netlify.com/v1/netlify-identity-widget.js" is:inline></script> </head> <body> ... <script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js" is:inline></script> </body>
the issue occurs in the exact same way reported above. As a a workaround i inserted a script tag at the end of the page with the following code
<script is:inline> if (window.netlifyIdentity) window.netlifyIdentity.on("logout", () => { window.netlifyIdentity.close(); document.location.href = "/"; }); </script>
I can confirm that by adding the script at the end of SebasZwolf's post that the fix worked. I added the script to the index.html page in public.
Describe the bug For some reason, when the Netlify identity widget is used, I click logout and the netlify-cms-user is removed from Local Storage (for a moment) but then gets added back. Which leads to the widget showing over the posts, and if I close the widget I can still click around the CMS (I can’t do anything because I’m not actually logged in) - but the CMS thinks I’m logged in.
To Reproduce Follow the steps here https://www.netlifycms.org/docs/add-to-your-site/
I’ve created a public repo that shows this behaviour… GitHub - codemzy/netlify-cms-auth-test just the basic set up for netlify-cms with identity and git-gateway.
You can see the behaviour here https://netlify-cms-logout.netlify.app/
Login with
cms@testing.com testing
And then log out, you’ll see a flash of the page logged out and then the CMS loads again like you are still logged in, and the identity widget pops up. Netlify-cms thinks you are still logged in. You can close the identity widget and it appears like you are still logged in. If you click logout a second time then it works. But you have to log out twice each time!
Expected behavior The CMS should remove the user
Screenshots
Applicable Versions: netlify-cms-app 2.15.72 netlify-cms-core 2.55.2 netlify-cms 2.10.192
CMS configuration
config.yml
Additional context Asked about this on the forum and was advised to open an issue here.