Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

The profile attributes not getting passed #15

Open
sivan123 opened this issue Aug 26, 2016 · 3 comments
Open

The profile attributes not getting passed #15

sivan123 opened this issue Aug 26, 2016 · 3 comments

Comments

@sivan123
Copy link

It seems that the profile attributes (name, email, roles etc) are not being passed in the jwt when making the server call. So the spring backend cannot resolve these and return UNKNOWN_USER.
Is there any other config to be done to make this happen?

@chenkie
Copy link
Contributor

chenkie commented Aug 27, 2016

Do you mean that this information is not being included in the JWT payload? Have you inspected your JWT to make sure it's there?

@MattWood21
Copy link

MattWood21 commented Nov 10, 2016

@chenkie This really should be included in all the examples but most importantly in the Custom Login example.

I couldn't find this in the new docs or examples anywhere and took me a while to guess the right "format" for providing this even though it might be "obvious" for those who have used Auth0 for a while.

Anyway, assuming you are using a Custom Login page you can use this which is exactly the same as the Custom Login example with the addition of the scope property being added to the object in the login method call (with whatever scope objects you're looking for from the user profile):

function login(username, password, callback) {
            angularAuth0.login({
                connection: 'Username-Password-Authentication',
                responseType: 'token',
                email: username,
                password: password,
                scope: 'openid email roles',
            }, callback);
        }

Without the scope property none of the profile properties are including the JWT token payload.

@ReaktorDTR
Copy link

@Padagi Thank's man, you saved my day.
I think that developers need to add more examples depend on custom login and using Auth0 without Lock module.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants