Open
Bug 1434428
Opened 6 years ago
Updated 3 years ago
Verified GitHub login not available via API
Categories
(Participation Infrastructure :: Phonebook, enhancement)
Participation Infrastructure
Phonebook
Tracking
(Not tracked)
NEW
People
(Reporter: hwine, Unassigned)
References
Details
(Whiteboard: [iam-debt])
We allow mozillians to identify using GitHub. However, their GitHub identity (called 'login' in the GitHub API) appears not to be available via the API. Note that the "email address" is not a usable value for associating with a GitHub account. Ideally, I'd like to be able to retrieve the GitHub user's "id"[1] via the Mozillians API. That value never changes, but is only useful via API calls. (The ID is returned in several different formats, depending on the query and API used - which format is stored does not matter for my usage.[2]) Alternatively, I'd like to be able to retrieve the GitHub user's "login" via the Mozillians API. While the GitHub login can be changed, it is exchangeable for an id via the GitHub API. The "login" is usable via the GitHub GUI, would be useful to be displayed in a Mozillian's profile (with the privacy options, of course). [1] https://developer.github.com/v3/users/ shows 'id' vs 'login' vs 'name' [2] https://developer.github.com/v4/scalar/id/ shows base64 string as ID. v3 uses integer. v4 is the future.
Some technical notes for nemo and tasos in particular - hopefully that's helpful to sort this out: From a CIS/Person-API pov we should most likely change the user profile to adapt for this - as this is definitely a use case we should support correctly - (this also means the query would technically go to PersonAPI, which we want to be "the mozillians API" in practice even thus it's different code. This means changing: ``` "emails": { "name": "github", "value": "a@b.com", .... ``` to: ``` "emails": { "name": "github", "value": "a@b.com", "original_user_id": "a", .... ``` Or something similar. The above structure has the advantage of staying compatible with any current implementation or API call. This also means it's going to be soon time for the user profile schema to be versioned and published at a central location as well. I'll let you decide how this would be exactly handled in Mozillians.org of course, though my own preference would be that Mozillians.org would make a direct OAuth2 call (not using Auth0) and insert that field when modifying the profile. This is because 1) Auth0 does not seem to pass the username/user id - it's part of URLs but it doesn't seem to be there as stand alone attribute ; and 2) because the "mozilla login page" makes it confusing for users ; then 3) the "mozilla login page" also creates an otherwise unused user in auth0's API as these are auto created by any login.
Comment 2•3 years ago
|
||
Unclear if this is a mozillians-specific issue, or if the problem lives on in peoplemo.
Whiteboard: [iam-debt]
Reporter | ||
Comment 3•3 years ago
|
||
One level of the problem has been addressed: the GitHub v3 & v4 login ids are stored in peoplemo.
Not yet addressed is the ability to query on the login ids. e.g. to map a GitHub login to an peoplemo record.
You need to log in
before you can comment on or make changes to this bug.
Description
•