Hi,
is the example code provided for enriching profile with tower data missing something ? This is what I get from Auth0 as suggested code and it seems to maybe be missing the actual adding data to the profile part ?:
function getTowerdataProfile(user, context, callback) {
const request = require(‘request’);
//Filter by app
//if(context.clientName !== ‘AN APP’) return callback(null, user, context);
if (!user.email || !user.email_verified) {
return callback(null, user, context);
}
request.get(
‘https://api.towerdata.com/v5/td’,
{
qs: {
email: user.email,
api_key: configuration.TOWERDATA_API_KEY
},
json: true
},
(err, response, body) => {
if (err) return callback(err);
if (response.statusCode === 200) {
context.idToken['https://example.com/towerdata'] = body;
}
return callback(null, user, context);
}
);
}