Hi.
I have a node.js with this code.
const server = http.createServer((request, response) => {
var {AuthenticationClient} = require('auth0');
var auth0 = new AuthenticationClient({
clientId: 'xxxxxxxxxxxxxxxxxxx',
domain: 'xxxxxxx.auth0.com'
});
auth0.getProfile(request.headers.authorization.substr(7), function (err, userInfo) {
if (err) {
// Handle error.
}
console.log(userInfo);
userinfo;
});
});
server.listen(3000);
I’m able to receive the profile, but no email in it.
{ sub: 'amazon|amzn1.account.xxxxxxxxxxxxxxxxxxxxxxxxxx',
nickname: 'javiercuellar',
name: 'Javier Cuellar',
picture:
'https://s.gravatar.com/avatar/fad6aa2308d50d62131312321312?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fjc.png',
updated_at: '2019-08-30T16:27:43.383Z' }
Any idea how can I receive the email?
Thanks!!!