Integration with ORCID (email not available by default) #1295
-
I want to integrate with ORCID. This provider does not provide an email scope and retrieving the email of a user from their profile requires the users to explicite "allow access to email for trusted parties". How deeply is the assumption of emails being available built into fastapi-users? As far as I can see, the How would I go about adjusting the authorization flow to have users provide their email after login worked with ORCID but no email address was returned? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @holtgrewe 👋 FastAPI Users assume an email address is available, as it's the unique identifier used for the user. The easiest way IMO is to make your ORCID client return fake adresses when it's not available, like |
Beta Was this translation helpful? Give feedback.
Hi @holtgrewe 👋
FastAPI Users assume an email address is available, as it's the unique identifier used for the user.
The easiest way IMO is to make your ORCID client return fake adresses when it's not available, like
user-{user_id}@orcid.org
. This way, you won't have to deeply change the behavior of the library. Users will then be able to change it if needed.