diff --git a/lib/profile.js b/lib/profile.js index a191b4a..8a8dbfe 100644 --- a/lib/profile.js +++ b/lib/profile.js @@ -21,6 +21,13 @@ exports.parse = function(json) { if (json.avatar_url) { profile.photos = [{ value: json.avatar_url }]; } + if (json.name) { + const [firstName, ...otherNames] = json.name.split(' '); + profile.name = { + givenName: firstName, + familyName: otherNames.join(' ') + }; + } return profile; };