Preheat oven to 300 degrees F. Line a rimmed baking sheet with parchment paper.
Place coconut oil in a large bowl. Heat in the microwave until melted. Whisk in pumpkin puree and pure maple syrup.
Add pumpkin pie spice (or spices) and salt to the bowl; whisk until well combined.
Add the pepitas, pecans, oats, and flaxseed and stir until evenly coated. Transfer granola to the prepared baking sheet. Bake for 20 minutes. Stir gently and then press granola into an even layer on the pan. Continue baking for 20-25 minutes more, until granola is crisp, dry to the touch, and lightly golden.
Cool completely on baking sheet (without stirring). Then, add the dried cranberries (if using) and gently transfer to an airtight storage container.
Store in the refrigerator for up to 2 weeks.