Closed mahdiraddadi closed 7 years ago
I am having the same issue. It seems like Auth0LockPasswordless does not support the scopes setting? I only need username from the profile :-)
Is there a nice way to send them correctly from the Angular2 app to the server? On the server-side, I succeeded in retrieving the userprofile by POST to /tokeninfo .. but this is not an elegant solution.
@jensdotbruggeman I found the solution, I think I did a wrong parameters in the json of the lock options and it's working fine for me, may my code will help you :
var lock = new Auth0LockPasswordless("AUTH0_CLIENT_ID", "AUTH0_DOMAIN");
lock.emailcode({
autoclose: true,
popup: true,
dict: {title: ""},
icon: "LOGO_URL",
primaryColor : 'rgb(3, 155, 229)',
authParams: {
scope: 'openid roles user_id email name'
}
},function (err, profile, id_token) {
if (!err) {
// Save the JWT token.
store.set('token', id_token);
onLoginCustomerSuccess(profile,id_token);
}}
);
I am trying to add app_metadata and user_metadata to scopes to get a token with user information, but I am reciving a token with openid informations only and when I try to see the scopes sent to the API https://mydomain.auth0.com/oauth/ro in parameters, I am seeing only the "openid". I am using the PasswordLessLock version v2.2.3. how can I solve this issues?