add cumin, coriander, cinnamon, garlic and chili, if using, and toast lightly, for about a minute. add onions to the spices, stir until coated, and saute until golden, stirring occasionally, about 10 minutes.