Following up on this post, I now have the ORCID login/log out working reliably, but there's a caveat (below).
The javascript solution is to set mode to no-cors, accept json, and include credentials.
fetch('https://sandbox.orcid.org/userStatus.json?logUserOut=true',{
mode: 'no-cors', headers: {accept: 'application/json'}, credentials: 'include'})
.then(function(response){ orcidSessionStatus('logout');})
.catch(function (err) { console.log(err); });
I found that removing any of those configs will cause it to fail. If you watch the console you won't actually see any json returned (although there IS some). The mode: no-cors setting makes this an opaque request so the lack of response is expected. I follow-up with a function (orcidSessionStatus) that checks the logged-in status.
There is a caveat: in testing this solution I was unable to make it work in a regular browser session - that is, a regular window using my configured browser. It *only* worked in an unused/fresh browser. Specifically, if I launched Chromium with a temporary profile the ORCID log out worked. If I used my regular browser it did not.
I spent a lot of time testing stuff like removing extensions, clearing cookies, changing settings, etc. Nothing worked. I then reset my browser and re-installed my extensions, and that did it.
Conclusion: something in my browser setup broke my ability to make ORCID force-logout work. I have no idea what it was.