afids / afids-validator

Validator for the anatomical fiducial placement protocol
https://validator.afids.io
GNU General Public License v3.0
2 stars 4 forks source link

ENH: OAuth login with ORCID #154

Closed tkkuehn closed 2 years ago

tkkuehn commented 2 years ago

Proposed changes

This PR adds the ability to log in to the AFIDs Validator (with an ORCID iD, using Flask-Dance), after which a user's ID will be associated with fiducial sets they submit for storage in the database.

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!

Notes

All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.

_PR template was adopted from appium_

tkkuehn commented 2 years ago

For reference: https://info.orcid.org/documentation/integration-guide/user-experience-display-guidelines/#Buttons_or_links_connecting_ORCID_via_OAuth

kaitj commented 2 years ago

Codewise this looks good to me. I am working through poetry to try to get the dependencies installed so I can test it again before merging.

One more recommendation is just to rebase from master / merge with master so that some of the files (eg. README) is updated.

kaitj commented 2 years ago

~Mostly seems fine to me - is it possible to clarify the instructions for redirecting the urls within orcid.py? Eg. Adding the local testing URI (eg. localhost:<port> or 127.0.0.1:<port>) on the orcid side. Got stuck here for a minute.~ I added this into the README.

I also added in FLASK_APP to the .env.template file, otherwise it keeps asking for the missing variable.

Otherwise, looks good to merge to me. Maybe we can hold off on merging it until we've chatted about setting up a staging + production heroku app.