Closed binury closed 7 years ago
Here's how I grab the email from the payload:
hook.data.email = hook.data.github.profile.emails.find(email => email.primary).value;
Note: scope
must include user:email
to receive the emails object formatted with the additional properties. Otherwise, you will only receive the user's email from their profile which may not even exist if they've hidden it.
Can you update the examples or link to the ones you were refering to?
Sure can. I'm referring to the examples in the readme of this repository which are also used in the main Feathers documentation.
Closed via #45
The
github
object contains only aprofile
property and anaccessToken
.The example provided (as well as an example within the Feathers core Docs akin to it) tries to access an undefined property.
The user's email can now be found within an array
emails
withinhook.data.github.profile