Giter VIP home page Giter VIP logo

Comments (18)

Nirjhor3029 avatar Nirjhor3029 commented on May 14, 2024 5

same problem here i'm just facing it.
the funny thing is i recently found a solution from stackoverflow that from

the solution is to remove the profile from scopes in vendor\laravel\socialite\src\Two\GoogleProvider.php

protected $scopes = [
'openid',
'email',
];

but when i removed the 'profile' scope it works fine for login only [ like who ever sign in/sign up previously for them that works fine ]
But for new user they can't login/sign up ...
if anyone can find some solution kindly suggest .
[thanks in advance]

from socialite.

Hujjat avatar Hujjat commented on May 14, 2024 3

I think this is bug, I tried all the options but it's not working. Please test it with latest version of Google API.

It works just fine for Facebook. But for Google, the code is missing.

from socialite.

spangeni44 avatar spangeni44 commented on May 14, 2024 2

@Hujjat @Nirjhor3029 solution does not give name of user thats not a solution.

from socialite.

lynmije avatar lynmije commented on May 14, 2024 2

I found a fix for this.
Google sent back a payload after requesting OAUTH. The payload contains a code object that you are supposed to send as headers along with the callback route on Socialite.

Socialite is not sending the code response back to google thus the error.
Fixed it without having to remove profile from the scopes vendor\laravel\socialite\src\Two\GoogleProvider.php

Object { code: "4/vAEVuHyCL3tmV8lv6jbJvsxllVOz4tq-iNxY5AC2fMJqTZMgu8u_B5S98mQCjPu1mGjskL9AA836zoT2sp8huNQ", scope: "email+profile+openid+https://www.googleapis.com/auth/userinfo.profile+https://www.googleapis.com/auth/userinfo.email", authuser: "1", session_state: "ae674d53c3d40e64a9a8aa79089b955a4e552bfc..cd9f", prompt: "consent" }

Can you share how you fixed the issue?

from socialite.

rejauldu avatar rejauldu commented on May 14, 2024 1

When I removed profile I don't see error but the name and nickname parameter becomes null.

from socialite.

felix2056 avatar felix2056 commented on May 14, 2024 1

I found a fix for this.
Google sent back a payload after requesting OAUTH. The payload contains a code object that you are supposed to send as headers along with the callback route on Socialite.

Socialite is not sending the code response back to google thus the error.
Fixed it without having to remove profile from the scopes vendor\laravel\socialite\src\Two\GoogleProvider.php

Object { code: "4/vAEVuHyCL3tmV8lv6jbJvsxllVOz4tq-iNxY5AC2fMJqTZMgu8u_B5S98mQCjPu1mGjskL9AA836zoT2sp8huNQ", scope: "email+profile+openid+https://www.googleapis.com/auth/userinfo.profile+https://www.googleapis.com/auth/userinfo.email", authuser: "1", session_state: "ae674d53c3d40e64a9a8aa79089b955a4e552bfc..cd9f", prompt: "consent" }

from socialite.

MrCrap avatar MrCrap commented on May 14, 2024 1

why has the case been closed?
what is the solution?

I have the same case, the problem occurs when on the server.

on localhost the normal way.

from socialite.

driesvints avatar driesvints commented on May 14, 2024

Can you first please try one of the following support channels? If you can actually identify this as a bug, feel free to report back.

from socialite.

spangeni44 avatar spangeni44 commented on May 14, 2024

Have anyone found solution to this problem?

from socialite.

Hujjat avatar Hujjat commented on May 14, 2024

@spangeni44 Yes we did. You should modify the socialite package source code. as @Nirjhor3029 said

from socialite.

felix2056 avatar felix2056 commented on May 14, 2024

Same problem. Nobody found a solution?

from socialite.

Adron55 avatar Adron55 commented on May 14, 2024

@felix2056 How did you solve this problem ? Can u share your solution ? Thanks in advance

from socialite.

InfiniteCoder96 avatar InfiniteCoder96 commented on May 14, 2024

Hi guys,
is there any solution to this without removing 'profile' from $scopes in GoogleProvider.php ?

from socialite.

dilpreet91 avatar dilpreet91 commented on May 14, 2024

This issue if from date on 6 Nov 2018, but still no solution on this. @driesvints I tried the shared discussion forums also. Could you please advise on as, that will be helpfull

Thanks in advance

from socialite.

Eman152 avatar Eman152 commented on May 14, 2024

can anyone have reach to a solution?

from socialite.

jonjieviduya avatar jonjieviduya commented on May 14, 2024

Try to set the redirect in your services inside the config folder, like so:

'google' => [
     'client_id' => env('GOOGLE_CLIENT_ID'),
     'client_secret' => env('GOOGLE_CLIENT_SECRET'),
     'redirect' => 'setYourURLHere'
]

from socialite.

CosminAndrei2000 avatar CosminAndrei2000 commented on May 14, 2024

I found a fix for this.
Google sent back a payload after requesting OAUTH. The payload contains a code object that you are supposed to send as headers along with the callback route on Socialite.

Socialite is not sending the code response back to google thus the error.
Fixed it without having to remove profile from the scopes vendor\laravel\socialite\src\Two\GoogleProvider.php

Object { code: "4/vAEVuHyCL3tmV8lv6jbJvsxllVOz4tq-iNxY5AC2fMJqTZMgu8u_B5S98mQCjPu1mGjskL9AA836zoT2sp8huNQ", scope: "email+profile+openid+https://www.googleapis.com/auth/userinfo.profile+https://www.googleapis.com/auth/userinfo.email", authuser: "1", session_state: "ae674d53c3d40e64a9a8aa79089b955a4e552bfc..cd9f", prompt: "consent" }

Can you please share your solution? Thanks.

from socialite.

driesvints avatar driesvints commented on May 14, 2024

Hey everyone,

I'm locking this issue because it either has gone off-topic, become a dumping ground for things which shouldn't be in an issue tracker or is just too old. Please try to discuss things further on one of the below channels:

from socialite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.