gigascience / gigadb-website

Source code for running GigaDB
http://gigadb.org
GNU General Public License v3.0
9 stars 14 forks source link

Improve ORCID affiliate login #553

Open pli888 opened 3 years ago

pli888 commented 3 years ago

We have had basic non-profit membership of ORCID for over a year now which allows us to use the production API server. One use of the ORCID API server is to retrieve the email address for a user that has logged into GigaDB with their ORCID credentials. This email address should be stored in the user's GigaDB account.

Before we are allowed to use the production ORCID API, we need to demonstrate that we can use the ORCID API that is deployed on their sandbox server. Looking at the existing ORCID code in the develop branch, I have identified the following steps to retrieve a user's email address using the ORCID API and then store it in the user's GigaDB account:

  1. Add new scenario in affiliate-login.feature to test for user email retrieval from ORCID sandbox server
  2. Register with ORCID sandbox server to get access to its API
  3. Create a test user account with an email address in ORCID sandbox server
  4. In components/OrcidStrategy class, update function userinfo($uid) so it works with sandbox ORCID API to retrieve email address from test ORCID user account. If it cannot connect to ORCID API then check for this and create a message in the log. Test the userinfo($uid) function with a new functional test
  5. Update processAffilateUser function in User class so it can call userinfo($uid) function in OrcidStrategy class to get the user email address and add it to user account

@rija can you check the above steps are suitable please?

rija commented 3 years ago

As an author I want to login using my ORCID ID So that I can have an authenticated ORCID ID in GigaDB

ScottBGI commented 3 years ago

As an author I want to login using my ORCID ID So that I can login more easily, have ORCID broker and carry over my details and metadata, and have an authenticated ORCID ID in GigaDB