3

5 months agoby Akil Raza

I am having issue while using socialite (with g+ login).

I get a "NO MESSAGE" error when i login using google accounts, it works fine on localhost, but this error occurs when trying it live.

/home/ideamagix/uat1gdg.ideamagix.com/vendor/laravel/socialite/src/Two/AbstractProvider.php --> error in this file on line 210

207 public function user() 208 { 209 if ($this->hasInvalidState()) { 210 throw new InvalidStateException; -----> error on this line. 211 } 212 213 $response = $this->getAccessTokenResponse($this->getCode());

Can you please help me out with this.

79

Sarthak Shrivastava replied 5 months ago

1

You can try stateless system for g login.

Laravel doc for stateless socialite

3

Akil Raza replied 5 months ago

0

Thanks for the quick reply Sarthak 🙂

I already tried that , but when i do that

Client error: POST https://www.googleapis.com/oauth2/v4/token resulted in a 400 Bad Request response: { "error": "invalid_request", "error_description": "Missing required parameter: code" }

3

Akil Raza replied 5 months ago

0

I even tried removing profile from $scopes = in GoogleProvider.php as well. but still the same

79

Sarthak Shrivastava replied 5 months ago

1

are you trying to use social login on SPA??

Your error is like there is some problem form code you get from google after authorization.

3

Akil Raza replied 5 months ago

0

Hey, No its not a SPA but the the login form opens in a pop-up ( so the login form and redirection after login is on the same page). But if this is the issues i think it should give error on local as well.

Ask Question
Most Visited
Categories