0

I have my linkedin scope set as follows:

SOCIAL_AUTH_LINKEDIN_SCOPE = ['r_basicprofile', 'r_emailaddress']

When I try logging in using python social auth then an exception is raised which is defined in my model:

if not email:
            raise ValueError('Users must have an email address')

while logging in with facebook and google work fine but not linkedin

The error means it does not have email field in it. I am working on my localhost

chaitanya90
  • 697
  • 2
  • 8
  • 24

1 Answers1

2

It looks like for linkedin we need to specify field selectors in order to get email address and other information from it unlike facebook and google. This is what i was missing:

SOCIAL_AUTH_LINKEDIN_FIELD_SELECTORS = ['email-address']
chaitanya90
  • 697
  • 2
  • 8
  • 24