check()) { $user = Auth::guard($guard)->user(); return response()->json([ 'message' => 'authenticated', 'name' => $user->name, 'preferences' => $user->preferences, ], 200); } } return $next($request); } }