microbiomedata / nmdc-server

Data portal client and server for NMDC.
https://data.microbiomedata.org
Other
9 stars 0 forks source link

Capture email from login flow #1271

Open naglepuff opened 4 months ago

naglepuff commented 4 months ago

Now that we use the /read-limited scope for ORCID authentication, we can expect to capture more information about our users during the login flow. There are use cases for having our users' email addresses, such as:

  1. Emailing submission authors if need be
  2. Notifying users who download data from the data portal of anything that they might need to know about the data they downloaded (this came up during the infrastructure sync on 5/30)

I would suggest adding a column to the user_logins table called orcid_email, and trying to read that info post-login, similarly to how we update user's names. We should update the /users endpoint and associated view to include the email address.