OJS v3 ORCID integration & auto-update

@hendy Yes, Publons has demonstrated it at the ORCID peer review webinar. You can find out more at their website

Bonus: PKP’s lightning presentation of the OJS ORCID integration

both of these are hosted on Vimeo, so they may not be accessible in all regions. : (

I’ve only heard brief mentions of Publons in the context of an OJS integration, but I’m not aware of any active work by PKP or the development partners on this. The link you supply, however, does look like development has started on an OJS 2.x plugin. You might want to check in with the authors on GitHub for information on their plans. It looks like work is quite current.

Hi @asmecher, @ctgraham,

I am testing ORCID integration now (ORCID Sandbox). And I think, there is something wrong with “Redirect URIs” setting they ask to define for API configuration.
E.g., I set the same URI for application and redirect: “92.***.58.220” (Is it right?).

Now, when I try to register user’s account with ORCID, everything goes fine until I press “Authorize”. Then I am redirected to something like:

http://92.***.58.220/index.php/test1/orcidapi/orcidAuthorize?targetOp=register&params=&code=o8G1v7

…Which cannot be obtained. What am I doing wrong?

The ORCID redirect URI should be your public OJS URL. The way this works is that OJS sends to ORCID a URL to which it wants ORCID to redirect the user after authentication. If that URL is in ORCID’s allowed redirect URLs, ORCID will redirect the user there.

It sounds like ORCID is redirecting you, but that you are unable to connect to the server.

What does your URL look like just before clicking the ORCID link on the OJS registration page?

Hi @ctgraham,

Thanks for the reply! The URL is http://92.***.58.220/index.php/test1/user/register

When you say the page for the redirected URL “cannot be obtained”, what exactly do you see? It is a network error? Is it an internal server error?

Yes, it’s the HTTP Error 500.

Check your error log for the detailed error message, and post it here.

Sorry, but is there a way to get the log from the OJS admin account (back-end)? I do not have any direct access to our logs now.

No, OJS can’t provide access to the server logs. You’ll need your system administrator or hosting provider to intervene if you do not have direct access. In the webserver’s error log, there will be a message (or messages) which correspond to this 500 error.

OK, I’ll have to wait until Monday, we still have holidays here)

Hi @ctgraham,

Sorry for the delay. We’ve managed to overcome the internal server error.
Now it seems to go through the authorization. But it does not synchronize accounts between ORCID and OJS, i.e. the fields are not autocompleted after the authorization.

The error is this:

[Wed Jan 11 13:33:47.366248 2017] [:error] [pid 5455] [client 10..3.1:37462] PHP Notice: Undefined variable: json in /var/www/html/plugins/generic/orcidProfile/pages/OrcidHandler.inc.php on line 66, referer: http://92..58.220/index.php/test1/user/register

This would probably indicate that ORCID returned some sort of failure response in the profile lookup. There isn’t really any use of error checking in the current version:

If the first instance of this error for you is line 66, you’re also back a bit from the current version in this plugin release.

Are you using the ORCID public API, or the ORCID members API for this plugin?

I am using the Member Sandbox API now.

I don’t think this plugin currently supports storing an OAuth scope token for the /read-limited scope (but I could be wrong), so I suspect that the read will depend on the /read-public permission.

Does the user selected for testing have a public ORCID profile? Can you add some code to an else on the if ($info['http_code'] == 200) { condition which would log the http_code and perhaps $result response from the member sandbox API call?

Hi @ctgraham,

I tried to test it on our production server (I tested on the test server before).The same problem here :frowning:

The Redirect URI works as follows:

OJS has a set of addresses it can respond to.

  • OJS production: my public web address is http://ojsPublicAddress
  • OJS development: my restricted web address is: http://ojsPrivateAddress

OJS will append its address onto the OAuth request to ORCID:

  • https://orcid.org/oauth/authorize?response_type=code&client_id=secret&redirect_uri=http://ojsPublicAddress/orcidAuth
    For example, note that here OJS production is telling ORCID to redirect the user back to http://ojsPublicAddress/orcidAuth after successful login.

ORCID has a list of allowed redirect URIs per Client key:

  • permit: http://ojsPublicAddress
  • permit: http://ojsPrivateAddress
  • permit: https://developers.google.com/oauthplayground/
    If ORCID does not recognize the URL is is given in the redirect request, it will not honor the OAuth request.

Hi @ctgraham,

The problem with the Redirect URI was my fault (I edited the previous message, sorry): I forgot to ask ORCID people to add new URI when I decided to test it on our production server. So now I’ve just reproduced the same condition on two different servers: the authorization works, but the accounts are not in sync :frowning:

Has anyone managed to set it up?

Dear ctgraham,

You wrote before: “This ORCID iD is not integrated with ORCID’s new Peer Review3 functionality at this time. You’ve caught my attention with it, however. I’m interested in seeing this integration and will try proposing it within the Pitt ULS for development for 2017. To my understanding, this would require an institutional membership.”

Are there any new developments on this?

Thanks! Gert

Hi @kruger,

I believe you’ve also posted this over here. Please don’t double-post – it clutters the forum.

Regards,
Alec Smecher
Public Knowledge Project Team