How long should you take steroid nasal spray for?

As long as needed. Steroid nasal sprays do not cure your allergies, but prevent the allergic inflammation. Once the medicine is stopped, your symptoms will return if you are still in contact with your allergen. If you want a more permanent change in your allergies, you need to consider something like immunotherapy, or allergy shots. However, steroid nasal sprays can usually be taken safely for long periods of time.
Indefinite. Fortunately, steroid nasal sprays are very safe. They can be used for long periods of time unless side effects happen. Best way to know if you continue to need is to do a washout period to see if symptoms worsen off the nasal spray. Discuss this with your allergist.