CGWP

  • Home
  • Log in
  • « ACL, contributor management now functional
  • Nightly DB maintenance »

ORCID update

Posted by gregster on 21 Apr 2019 in Activity log

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.

This entry was posted by Greg and filed under Activity log.

CGWP

Development blog for next version of the Canadian Great War Project. The production site is at https://cgwp.uvic.ca/, and the development site is at https://cgwpdev.uvic.ca/ (access controlled)

Some sections of the development site are not explicitly linked via menus. See the post titled "CGWP development URLs" for details.
  • Home
  • Recently
  • Archives
  • Categories
  • Latest comments

Search

Categories

  • All
  • Activity log
  • Discussion
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2026 by admin • Help • blog software • PHP hosting