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

Return Facebook login profile picture as other providers #71

Merged
merged 1 commit into from May 5, 2018

Conversation

lamasgergo
Copy link
Contributor

Hey!

Type: new feature

Link to issue:

  • [x ] I have read and understood the Contributing Guidelines.
  • [ x] I have checked that another pull request for this purpose does not exist.
  • I wrote some tests for this PR.

Small description of change:

Google returns only one simple string with profile picture instead of Facebook wich returns an object.
So i have override "picture" variable in return , and saved the original object into "picture_object" (if you need)

Thanks lamasgergo

@ADmad
Copy link
Contributor

ADmad commented Apr 10, 2018

Ideally for normalization a photo/picture property should be added to Entity/User class of socialconnect/common and the providers should populate it whenever possible.

@ovr
Copy link
Member

ovr commented Apr 10, 2018

Ideally for normalization a photo/picture property should be added to Entity/User class of socialconnect/common and the providers should populate it whenever possible.

We need to do research about this moment (Photos) for popular providers :shipit:

@lamasgergo
Copy link
Contributor Author

@ADmad your Cakephp social auth plugin not handle that if the picture coming in object (patch entity drops a warning) thats why i had added this row here.

Handle pictures in entity could be better, but as @ovr said need some (or a lot) research :)

thanks

@ADmad
Copy link
Contributor

ADmad commented Apr 10, 2018

@ovr Yeah each provider would need slightly different code to get the profile photo URL. But I am talking about adding a property to the user entity class. Each provider could then be updated one by one to map the photo URL to this property as it's done for other values like username, email etc.

@lamasgergo My plugin only uses the User entity class from social connect which currently does not have any property for picture. So now sure what error you are getting. You can open a separate issue/PR for my plugin with details.

@ovr ovr merged commit 9ab7a42 into SocialConnect:master May 5, 2018
@ovr
Copy link
Member

ovr commented May 5, 2018

I am sorry for too late reply, because I am slowpoke :(
Prepared v1.10.0 - https://github.com/SocialConnect/auth/releases/tag/1.10.0

Now We support $user->pictureURL for

  • Facebook
  • GitHub
  • Google
  • Vk
  • Bitbucket
  • Twitter

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

Successfully merging this pull request may close these issues.

None yet

3 participants