Reputation: 375
I have an issue with Socialite on Laravel 5.5 I have Socialite required by composer, updated services.php with different providers credential and updated providers in app.php This is the error I am getting
Type error: Argument 1 passed to Laravel\Socialite\SocialiteManager::formatRedirectUrl() must be of the type array, null given
Any help is highly appreciated.
Upvotes: 0
Views: 1164
Reputation:
Check config/services.php
for the provider you're authenticating with. The redirect entry needs to be set to your defined route.
'redirect' => 'http://your-callback-url'
Example:
// config.services.php
'github' => [
'client_id' => env('GITHUB_CLIENT_ID'),
'client_secret' => env('GITHUB_CLIENT_SECRET'),
'redirect' => 'http://example.com/github/redirect',
],
// routes/web.php
Route::get('github/redirect', 'GitHubController@redirect')
Upvotes: 1
Reputation: 2588
In most of the cases, the issue is solved through 3 steps:
php artisan clear-compiled
composer dump-autoload
php artisan optimize
Hope it helps. Thanks.
Upvotes: 2