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

PictureURL missing when using Google #121

Closed
enricalberola opened this issue May 9, 2020 · 3 comments
Closed

PictureURL missing when using Google #121

enricalberola opened this issue May 9, 2020 · 3 comments

Comments

@enricalberola
Copy link

Hi!!

Issue

I'm using the library admad/cakephp-social-auth to authenticate users with Google id and I've noticed that this library is not storing each user's profile picture.

Looking for info about this error I found that you just fixed a similar issue related to the Steam provider (#117) and debugging it I noticed that adding the reference to this field in Google->getIdentity() fixed it.

diff --git a/src/OpenIDConnect/Provider/Google.php b/src/OpenIDConnect/Provider/Google.php
index f510ddd..99e2548 100644
--- a/src/OpenIDConnect/Provider/Google.php
+++ b/src/OpenIDConnect/Provider/Google.php
@@ -102,6 +102,7 @@ class Google extends AbstractProvider
             'email' => 'email',
             'verified_email' => 'emailVerified',
             'name' => 'fullname',
+            'picture' => 'pictureURL',
             'gender' => static function ($value, User $user) {
                 $user->setSex($value);
             },

If you want I can try to submit a PR. I've never dit it before, but I can try to do it.

My env

PHP:7.3.11
Library: cakephp-social-auth (cake-4.x)
Provider: admad


Thanks :smiley_cat:
@nepster-web
Copy link
Contributor

nepster-web commented Aug 3, 2020

plus. need to add

nepster-web added a commit to nepster-web/auth that referenced this issue Aug 3, 2020
@nepster-web nepster-web mentioned this issue Aug 3, 2020
3 tasks
@nepster-web
Copy link
Contributor

I was creted #125

ovr pushed a commit that referenced this issue Aug 4, 2020
for this issues #121
@ovr
Copy link
Member

ovr commented Aug 4, 2020

Thanks @nepster-web for PR
Thanks @enricalberola for issue

Fix come in 3.1.7 release

@ovr ovr closed this as completed Aug 4, 2020
ovr pushed a commit to SocialConnect/openid-connect that referenced this issue Aug 4, 2020
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