Laravel Socialite (Google) error: ClientException exception in Middleware.php 69 line; Error 403

I am setting up a Laravel application for authentication with Google.

I am asked to choose a Google account and allow access to my Google information, and I have everything that works with the callback function.

When my callback function works (it is called correctly), I get:

  • ClientException in Middleware.php 69 line:
  • Client Error: 403

The code of my AuthController, resulting in an error:

$user = \Socialite::driver('google')->user(); 

I would be grateful for any help. I am using Laravel 5.1 and Socialite 2.0.

+6
source share
2 answers

This turned out to be a mistake on the Google side. The client has enabled the Google+ API in the console. Now all is well.

+8
source

Error 403 is an access error from the end of Google. Make sure you also include the API from the end of the Google you are going to use.

An easy way to check the situation and see what the problem is: curl -H "Authorization: Media 1 / fFBGRNJru1FQd44AzqT3Zg" https://www.googleapis.com/plus/v1/people/me

+1
source

All Articles