This question may be seen as a follow up of this original question. I'm learning Cheeger-Simons differential characters (reading Differential Characters of Bär and Becker). If I understand correctly, the idea is based on the fact that something like this is true:
Let $P \to M$ be a principal $G$-bundle where $G = U(1)$ and let $\omega$ be a connection in $P$. Denote by $F_\omega \in \Omega^2(M, \mathfrak{g}_P)$ the curvature of $\omega$.
Let $S \subseteq M$ be an oriented $2$-dimensional submanifold with boundary $\gamma = \partial S$. Then $$\mathit{hol}_\omega (\gamma) = \exp\left(\int_S F_\omega\right) \in G\,.$$
(In the book, there is $2i\pi$ in front of the integral, but I guess it's because they choose an identification $\mathfrak{u}(1) \approx \mathbb{R}$).
Why is this identity true? Does some version of this hold for more general $G$? If that were the case, it would seem like a better version of Ambrose-Singer / a pretty good answer to the original question.