laravel / socialite

Laravel wrapper around OAuth 1 & OAuth 2 libraries.

Home Page:https://laravel.com/docs/socialite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to access array offset on value of type null

AsimShahzad490 opened this issue · comments

Socialite Version

5.11.0

Laravel Version

5.11.0

PHP Version

8.1

Database Driver & Version

MYSQL 5

Description

In controller I coded like
public function redirectToLinkedin()
{
return Socialite::driver('linkedin-openid')->redirect();
}

Also created linkedin App with openID
But getting this issue/error
"Trying to access array offset on value of type null"

Steps To Reproduce

Not a bug, I just need help if it works.

Aaaaaah,
I found exception in my code
I just updated

'linkedin' => [
'client_id' => env('LINKEDIN_CLIENT_ID'),
'client_secret' => env('LINKEDIN_CLIENT_SECRET'),
'redirect' => env('LINKEDIN_REDIRECT'),
],

to

'linkedin-openid' => [
'client_id' => env('LINKEDIN_CLIENT_ID'),
'client_secret' => env('LINKEDIN_CLIENT_SECRET'),
'redirect' => env('LINKEDIN_REDIRECT'),
],
and its working.