Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upfeat: optionally return all raw email addresses for user #4
Conversation
ultrabluewolf
reviewed
Feb 6, 2019
|
||
if (self._allRawEmails) { | ||
profile.emails = json.map(function (email) { | ||
var mappedEmail = Object.assign(email, { value: email.email }); |
This comment has been minimized.
This comment has been minimized.
ultrabluewolf
Feb 6, 2019
How do you know which email is the primary one? Should we add type to these? See: http://www.passportjs.org/docs/profile/
This comment has been minimized.
This comment has been minimized.
jaredscheib
Feb 6, 2019
Author
Collaborator
here's a sample json
object:
[ { primary: true,
verified: true,
visibility: 'private',
value: 'bob.pineapple@gmail.com' },
{ primary: false,
verified: true,
visibility: null,
value: 'pineapple@users.noreply.github.com' },
{ primary: false,
verified: true,
visibility: null,
value: 'bob@pineapple.com' } ]
This comment has been minimized.
This comment has been minimized.
ultrabluewolf
Feb 6, 2019
Ah, is this what the response looks like? [ { "email": "octocat@github.com", "verified": true, "primary": true, "visibility": "public" } ]
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jaredscheib
Feb 6, 2019
Author
Collaborator
my map
just transforms these objects to have a value
key, which seems to be a convention across passport addons
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ultrabluewolf
approved these changes
Feb 7, 2019
ultrabluewolf left a comment
LGTM, but it would be great to add a test as well. |
jaredscheib
merged commit b39119d
into
master
Feb 7, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
jaredscheib commentedFeb 6, 2019
•
edited
Adopted in part from jaredhanson#27