Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am setting up a Laravel app to authenticate with Google.

I am prompted to select a Google account and allow access to my Google info and I have everything working up to the callback function.

When my callback function runs (it does get called correctly) I get:

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

The code in my AuthController leading to the error is:

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

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

like image 858
Ted Avatar asked Jul 21 '15 03:07

Ted


2 Answers

This proved to be an error on the Google side of things. The client enabled the Google+ API in the console. Things work fine now.

like image 168
Ted Avatar answered Nov 16 '22 18:11

Ted


The 403 error is access error from the google end. Check that you've also enabled the APIs from the google end you intend to use.

Easy way to test things and see what's problem: curl -H "Authorization: Bearer 1/fFBGRNJru1FQd44AzqT3Zg" https://www.googleapis.com/plus/v1/people/me

like image 1
Tuxie Avatar answered Nov 16 '22 18:11

Tuxie