Let us consider abelian and non-abelian 3d quantum Chern-Simons theory path integrals:

abelian Chern-Simons theory on non-spin manifolds --- $$ \int [DA]\exp(i \frac{k}{2\pi} \int_X (A \wedge dA )) $$

abelian Chern-Simons theory on spin manifolds --- $$ \int [DA]\exp(i \frac{k}{4\pi} \int_X (A \wedge dA )) $$

non-abelian Chern-Simons theory --- $$ \int [DA]\exp(i \frac{k}{4\pi} \int_X \mathrm{Tr}_{} (A \wedge dA + \frac{2}{3} A \wedge A \wedge A)) $$ where $A$ takes values in the Lie algebra valued $\mathcal{G}$ 1-form. So does the Tr take the matrix representations in the Lie algebra $\mathcal{G}$.

What are the correct and rigorous ways to argue the quantization of values of $k$?

I think there are three possible helpful ideas:

extend 3-manifolds $X$ to 4-manifolds $Y$?

large gauge transformation.

Use Wess Zumino Witten like terms.

Could any expert demonstrate these line by line?