ORCID-Source
ORCID-Source copied to clipboard
/me endpoint
Just making a quick request if at all possible.
Could we have a /me API endpoint that takes in a user's token as Bearer auth and returns that user's object details...
Hi,
We have a userinfo endpoint at https://orcid.org/oauth/userinfo that works as you expect.
Documentation can found at https://github.com/ORCID/ORCID-Source/blob/master/orcid-web/ORCID_AUTH_WITH_OPENID_CONNECT.md#other-endpoints
Hope that helps!
@TomDemeranville Ah, perfect. Thanks Tom!
@TomDemeranville Sorry Tom, I'm just reopening this issue. Is there any possibility that this endpoint could return an email address?
97.7% of our users keep their email address private, so we didn't include it in the userinfo as it would be disappointingly empty in most cases.
@TomDemeranville Could I suggest the following changes:
- Endpoint is duplicated, for backwards compatibility, to also be accessible on
'https://orcid.org/me'
- Endpoint returns the email / person if allowed, if not - empty email key => value (e.g.,
email: null
). - Could the response match more closely with a
https://api.sandbox.orcid.org/v2.0/{}
call...so instead of 'sub' key, we have 'orcid' or 'id' key.
This would allow for better integration of your OAuth service with the python-social-auth module: https://github.com/python-social-auth/social-core/blob/master/social_core/backends/orcid.py
via RESTful API service.
Hi, thanks for the suggestions. We will look at them in 2023 when we're also looking at PKCE.