Hello
I have just started to try out the Auth0 with Django.
For now I am able to log in, and can se basic data.
(Follow this guides.
Django Tutorial: Building and Securing Web Applications and
Auth0 Django SDK Quickstarts: Login)
Now, i would like to get the given_name and family_name.
In my settings.py i have defined this:
SOCIAL_AUTH_AUTH0_SCOPE = [
‘openid’,
‘profile’,
‘email’,
‘given_name’,
‘family_name’,
]
And my views.py:
def dashboard(request):
user = request.user
auth0user = user.social_auth.get(provider='auth0')
userdata = {
'user_id': auth0user.uid,
'name': user.first_name,
'picture': auth0user.extra_data['picture'],
'email': auth0user.extra_data['email'],
}
Here i have tried to add family_name and given_name using auth0.given_name and auth0.family_name.
Altso tried with the auth0user.extra_data['family_name].
So, can some one point me in the right direction here, so i`m albe to show that data?
Thanks!