Hi,
I’ve created a custom social connection, and it works as expected. However, the email/name doesn’t appear on the dashboard in the API management.
Is there any way to add the user’s email (or last name/first name) to the dashboard?
Thank you.
edit : Don’t know if it can helps but here is how I fetch my user’s profile :
function getUserInfo(accessToken, ctx, cb) {
request.get({
url: 'https://orcid.org/oauth/userinfo',
headers: {
'Authorization': 'Bearer ' + accessToken
}
}, function(err, response, body) {
if (err) {
cb(err);
return;
}
if (response.statusCode !== 200) {
cb(new Error('Failed to fetch user profile from ORCID API: ' + response));
return;
}
const profileData = JSON.parse(body);
cb(null, profileData);
});
}