Closed striped-s0cks closed 8 years ago
Try with the following scope: r_basicprofile -> picture-urls::(original)
I've tried everything. 'The scope is unknown' picture-urls::(original) picture-url::(original) r_basicprofile picture-urls::(original) r_basicprofile picture-url::(original) r_basicprofile -> picture-urls::(original) r_basicprofile -> picture-url::(original)
passport.use(new LinkedInStrategy({ clientID : configAuth.linkedinAuth.clientID, clientSecret : configAuth.linkedinAuth.clientSecret, callbackURL : configAuth.linkedinAuth.callbackURL, scope : [ 'r_basicprofile', 'r_emailaddress', 'picture-urls::(original)' ], passReqToCallback : true }
I also tried to use profileFields: ['picture-urls::(original)'] But I've got Error: Failed to serialize user into session
It happens because with profileFields body (https://github.com/auth0/passport-linkedin-oauth2/blob/master/lib/oauth2.js#L32) has next structure:
{"pictureUrls": { "_total": 1, "values": ["https://media.licdn.com/mpr/mprx/......"] }}
And here we got a big picture.
So, now question is how to combine profileFields and basic user info?
Please try with passport-linkedin-oauth2@1.4.0
var user_picture = user._json.pictureUrls.values[0];
Thank you! Sorry about old version. And thanks for making authorization easier!
Have a nice day.
it wasn't an old version, I created v1.4.0
a couple of minutes ago :)
Is there some way to get big user's avatar using passportjs? Now it's only 80x80