Use-case: user logs in to my app using ORCID oauth; user logs out of session on my server and is automatically signed out of ORCID session

Plain javascript implementation:

            fetch('https://sandbox.orcid.org/userStatus.json?logUserOut=true',{
                mode: 'no-cors',
                headers: {Accept: 'application/json'},
                credentials: 'include'})
            .then(function (response) {
                return response.json();
            })
            .then(function (data) {
                if (data.loggedIn === false) {
                    document.getElementById('logOutAttemptResult').innerText = 
                    'The javascript fetch method was used to request https://sandbox.orcid.org/userStatus.json?logUserOut=true';
                }
            })
            .catch(function (err) {
                console.log(err);
            });
        

This solution works as of April 8, 2019.


In order to test this, please ensure that you are starting with a clean slate:


The test

  1. Click 'Check logged-in status' button above to check your current logged in status - results displayed below. Should be false.
  2. Log in to https://sandbox.orcid.org/signin
  3. Check your current logged in status again using 'Check logged-in status' button above.
  4. Check your current status by explicitly looking at your profile at https://sandbox.orcid.org/my-orcid
  5. Click the 'Log out of your ORCID session' button above.
  6. Check your current logged in status again.
  7. Check your current status by explicitly looking at your profile at https://sandbox.orcid.org/my-orcid

Expected outcome is that from this page you should be able to force an ORCID signout.

If, after running through this process, the page at https://sandbox.orcid.org/my-orcid allows you to edit the profile you are NOT logged out.


:: Diagnostics ::

Your loggedIn status: no test has been run