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

Issue with Google+ Provider #314

Closed
bocahptualang opened this issue Dec 19, 2018 · 5 comments
Closed

Issue with Google+ Provider #314

bocahptualang opened this issue Dec 19, 2018 · 5 comments

Comments

@bocahptualang
Copy link

Error when authenticate with google+ provider (Socialite version 4.0.0).
I tried downgrade socialite version to 3.1.1 and it is working.

image

GoogleProvider.php
image

Anyway, is there any way to override mapping function from response we get from provider to user object? it would be nice if got one.

@rjvandoesburg
Copy link

rjvandoesburg commented Dec 19, 2018

I too am experiencing this problem with a newly created token. On another website (different token) I am still receiving displayName.

Attached 2 different responses:

The old one is from another implementation

{
  "kind": "plus#person",
  "etag": "\"random_string\"",
  "emails": [
    {
      "value": "rjvandoesburg@example.com",
      "type": "account"
    }
  ],
  "objectType": "person",
  "id": "id",
  "displayName": "Robert-John van Doesburg",
  "name": {
    "familyName": "van Doesburg",
    "givenName": "Robert-John"
  },
  "image": {
    "url": "https://placehold.it/50x50",
    "isDefault": false
  },
  "isPlusUser": false,
  "language": "en_GB",
  "verified": false,
  "domain": ""
}

This is the response I'm getting from a newly generated key.

{
  "id": "",
  "email": "rjvandoesburg@example.com",
  "verified_email": true,
  "name": "Robert-John van Doesburg",
  "given_name": "Robert-John",
  "family_name": "van Doesburg",
  "link": "https://plus.google.com/",
  "url": "https://placehold.it/50x50",
  "locale": "en-GB",
  "hd": ""
}

As they differ so much I think I'm doing something different so I'll keep looking into it.

Cheers,

@NicolaeCasir
Copy link

Good job man. I just wanted to make PR... With email its OK.. but with name, its a problem... i've edited GoogleProvider in vendor but im waiting for merge!

@rjvandoesburg
Copy link

Merging the PR will break my other implementations so more investigation is needed or the PR need to be updated to accommodate both responses

@chienqan
Copy link

chienqan commented Dec 19, 2018

I have the same problem too, I have used dd and see that not only name but also nick name, email and avatar url

@driesvints
Copy link
Member

Just merged the PR. I'll tag a new release in a bit.

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

5 participants