Logout not working with Netlify Auth Widget
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**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](https://github.com/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/](https://netlify-cms-logout.netlify.app/)
Login with
[cms@testing.com](mailto: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`](https://github.com/codemzy/netlify-cms-auth-test/blob/main/dist/admin/config.yml)
**Additional context**
[Asked about this on the forum](https://answers.netlify.com/t/logout-not-working-with-netlify-auth-widget/66854) and was advised to open an issue here.
Contributor guide
Assessment
This issue has not been assessed yet.