EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #09875


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] ORCID authentication problem


Hi Volker,

From your description it looks like this is the line with the issue:

my $sth = $db->prepare_select( "SELECT id FROM orcid_log WHERE user =".$db->quote_int( $current_user->get_value( "userid" ) )." AND state =".$db->quote_value( $state ) );

However, I am not exactly sure which version you have installed, so it could be a different line but the line 39 previous to this from at least 2017 onwards does not have a 'get_value' on it.

This error suggests the $current_user is not set.  You should only be able to call /cgi/orcid/authenticate as a logged in uses so it is odd that it is not set.  However, I think I have encountered this issue with other plugins that call off to another site (e.g. institutional single sign on) and is then returned to your EPrints repository.  This is due to a security change in 3.4.5 (also in 3.4.6) that sets the SameSite attribute for the secure_eprints_session... cookie to strict.

/cg/orcid/authenticate has several places where it uses EPrints::Repository's redirect function and then exits.  Rather than doing this it will need to actually load a real web page that then redirects to the appropriate location.  I believe this issue already references the problem:


I will look into writing a patch to fix this but I need to setup a test environment, so I can interact with the ORCID API and test whether the change suggest in the above issue fixes the issue.

Regards

David Newman

On 15/11/2024 12:49, Schallehn, Volker wrote:
CAUTION: This e-mail originated outside the University of Southampton.
CAUTION: This e-mail originated outside the University of Southampton.

Hi all,

 

We have installed the ORCID implementation from Github: https://github.com/eprints/orcid_support_advance a couple of years ago.

 

But since we updated to the latest EPrints version 3.4.6, users can no longer authenticate their account with ORCID. The error message reads: Can't call method ‘get_value’ on an undefined value at /opt/eprints3/cgi/orcid/authenticate line 39.

Have any of you experienced the same problem and do you have a solution?

 

Thanks in advance,

Volker

 


*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List
*** Archive: https://www.eprints.org/tech.php/
*** EPrints community wiki: https://wiki.eprints.org/