I initialise auth0 like this
angularAuth0Provider.init({
clientID: __env.auth0.clientId,
domain: __env.auth0.domain,
responseType: 'token id_token',
audience: 'https://' + __env.auth0.domain + '/userinfo',
redirectUri: __env.auth0.redirectUrl,
scope: 'openid email profile user_metadata app_metadata'
})
I send the user to the hosted login page by calling .authorize(...)
angularAuth0.authorize({
allowed_connections: ['linkedin', 'facebook', 'google-oauth2', 'windowslive', 'email'],
});
The lock at the hosted login page is initialized like this
var allowed_connections = config.extraParams.allowed_connections;
var lock = new Auth0LockPasswordless(config.clientID, config.auth0Domain, {
auth: {
redirectUrl: config.callbackURL,
responseType: (config.internalOptions || {}).response_type ||
(config.callbackOnLocationHash ? 'token' : 'code'),
params: config.internalOptions
},
assetsUrl: config.assetsUrl,
allowedConnections: allowed_connections ? allowed_connections : null,
closable: false,
socialButtonStyle: 'small'
});
When user has returned to the callback page, I parse the hash and call .userInfo()
angularAuth0.parseHash(function(err, authResult) {
if (authResult && authResult.accessToken) {
angularAuth0.client.userInfo(authResult.accessToken, function (error, user) {
console.log(user);
});
} else if (err) {
console.log(err);
}
});
where user
looks like this
{
"sub": "linkedin|...",
"given_name": "...",
"family_name": "...",
"nickname": "...",
"name": "...",
"picture": "https://media.licdn.com/dms/image/...",
"updated_at": "2018-05-08T11:36:53.273Z",
"email": "...",
"email_verified": true
}
When looking at the Raw JSON at the online user management I can see a lot more info, e.g. publicProfileUrl
.
How do I get that info?