We show that when the Abelian \CS\ theory coupled to matter fields is quantized in a vacuum with non vanishing magnetic flux (or electric charge), the requirement of gauge invariance at finite temperature leads to the quantization of the \CS\ coefficient and its quantum corrections, in a manner similar to the non-Abelian case.