Maybe I got it by using the Auth::login(); method:
Cas::authenticate();
$uid = Cas::user();
$userObject = \App\User::where('name' , $uid)->firstOrFail();
if ( $userObject ) {
Auth::login($userObject);
Session::put('casUser' , $uid);
return $next($request);
}
Problem not solved. Every time loading a page a new session is created. Tried to check if Auth::user() is true to not log in again, but it didn't worked.
Any ideas?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community