Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to retrieve any extra_data from LinkedIn backend #161

Closed
stianpr opened this issue Jan 16, 2014 · 8 comments
Closed

Unable to retrieve any extra_data from LinkedIn backend #161

stianpr opened this issue Jan 16, 2014 · 8 comments

Comments

@stianpr
Copy link

stianpr commented Jan 16, 2014

Either I'm doing something wrong or there is a bug. I have tested with latest master and in 0.1.17.

After sucessfully created a user the extra_data field contains this:

{
"first_name": null,
"last_name": null,
"access_token": {
  "oauth_token_secret": "****scramled****",
  "oauth_authorization_expires_in": "5183998",
  "oauth_token": "****scramled****",
  "oauth_expires_in": "5183998"
},
"picture_url": null,
"email_address": null,
"id": "****scramled****"
"profile_url": null
}

I have these settings in my settings.py file:

SOCIAL_AUTH_LINKEDIN_SCOPE = ['r_basicprofile', 'r_emailaddress']
SOCIAL_AUTH_LINKEDIN_FIELD_SELECTORS = ['email-address', 'picture-url',
                                        'public-profile-url']
SOCIAL_AUTH_LINKEDIN_EXTRA_DATA = [
  ('id', 'id'),
  ('first-name', 'first_name'),
  ('last-name', 'last_name'),
  ('email-address', 'email_address'),
  ('picture-url', 'picture_url'),
  ('public-profile-url', 'profile_url'),
]

And the SOCIAL_AUTH_PIPELINE setting contains 'social.pipeline.social_auth.load_extra_data',

Any clues of why the extra_data fields are blank? Is there something I'm missing?

@omab
Copy link
Owner

omab commented Jan 16, 2014

Try with:

SOCIAL_AUTH_LINKEDIN_EXTRA_DATA = [
    ('id', 'id'),
    ('firstName', 'first_name'),
    ('lastName', 'last_name'),
    ('emailAddress', 'email_address'),
    ('pictureUrl', 'picture_url'),
    ('publicProfileUrl', 'profile_url'),
]

@stianpr
Copy link
Author

stianpr commented Jan 16, 2014

Sweet. That work! Thanks =)

The documentation for LinkedIn backend should be updated then? I can make a pull request if you want?

@omab
Copy link
Owner

omab commented Jan 16, 2014

@stianpr, that's great, looking forward to that PR.

@omab omab closed this as completed in 9bd1bfc Jan 16, 2014
@omab
Copy link
Owner

omab commented Jan 16, 2014

@stianpr, I've made the change to the docs, they were fair simple, thanks for catching that.

@stianpr
Copy link
Author

stianpr commented Jan 17, 2014

Sweet. And thanks for giving us a good authentication framework!

@eroninjapan
Copy link

The online docs are still showing the incorrect values even though I see they've been updated in the repo. Can you please update or is it no longer maintained? http://python-social-auth.readthedocs.org/en/latest/backends/linkedin.html

@omab
Copy link
Owner

omab commented Jul 20, 2014

Docs should be updated now.

@eroninjapan
Copy link

Looks great, thanks!

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

No branches or pull requests

3 participants