I try to authenticate user but nothing happens in controller
I do the next
$authUser = User::where('password', md5($user->salt . $request->get('password')))
->where('email', $request->get('email'))
->first(['login', 'email', 'firstname', 'lastname', 'zip_code','phone']);
if ($authUser) {
Auth::login($authUser);
return response()->json(['user' => $authUser]);
}
response returns me user but for next request I get error that user not authenticated. Any idea?