Edit: Thanks for davidlowryduda, the correct identity should be
$$ \sum_{n=-\infty}^{+\infty} G(1,{\chi})\overline{\chi(n)}e^{\frac{-n^2\pi x}{N}}=\sum_{m=1}^{N}\left( \chi(m)\left( \sum_{n=-\infty}^{+\infty}\omega^{mn}e^{\frac{-n^2\pi x}{N}} \right) \right)$$.
The following is the origin post, which I did not edit the wrong identity. (I am afraid davidlowryduda's answer may be confusing to people who read the post later if I edited it.)
$N\ge 2$ is a given positive integer. $\chi$ is a primitive Dirichlet character modulo $N$. $G(k,\chi)$, where $k\in\mathbb{Z}_+$ is the Gauss sum $$G(k,\chi):=\sum_{m=0}^N \chi(m)\omega^{km}$$, where $\omega=e^{\frac{2\pi i}{N}}$. I am reading a proof of the analytic continuation of $L(s,\ \chi)$, and the writer used the following identuity, which I can not figure out why:
$$\sum_{n=-\infty}^{+\infty} G(1,\bar{\chi})\chi(n)e^{\frac{-n^2\pi x}{N}}=\sum_{m=1}^{N}\left( \chi(m)\left( \sum_{n=-\infty}^{+\infty}\omega^{mn}e^{\frac{-n^2\pi x}{N}} \right) \right) $$
(This is incorrect. See the edit above.)
I know $$LHS=\sum_{n=-\infty}^{+\infty} \left(\sum_{m=1}^{N} \bar{\chi(m)\omega^m}\chi(n)e^{\frac{-n^2\pi x}{N}} \right)=\sum_{-\infty<n<+\infty\ 1\le m\le N} \bar{\chi(m)\omega^m}\chi(n)e^{\frac{-n^2\pi x}{N}} $$, would this help the proof?
I think it is easier to go from the RHS to the LHS. The RHS is $$ \sum_{m=1}^{N} \chi(m)\left( \sum_{n=-\infty}^{+\infty}\omega^{mn}e^{\frac{-n^2\pi x}{N}} \right) = \sum_{n \in \mathbb{Z}} e^{-\frac{n^2 \pi x}{N}} \sum_{m \bmod N} \chi(m) \omega^{mn}.$$ The claimed identity would then follow from an identity $$ \sum_{m \bmod N} \chi(m) \omega^{mn} \stackrel{?}{=} G(1, \overline{\chi}) \chi(n).$$
This actually isn't true, but it's almost true in a way that is a very common mistake. One can show the analogous identity that $$ \sum_{m \bmod N} \chi(m) e^{2 \pi i m n/N} = \overline{\chi(n)} G(1, \chi), \tag{1} $$ which is the same as the (implicitly) claimed result except with the opposite set of conjugations. I would expect that the remainder of the analytic continuation argument would carry though perfectly well, and the incorrect conjugations is mostly a notational mistake.
Showing $(1)$ when $\gcd(n, N) = 1$ is easy. Changing variables $m \mapsto mn$ in the standard Gauss sum shows $$ G(1, \chi) = \sum_{m \bmod N} \chi(nm) e^{2 \pi i m n/N} = \chi(n) \sum_{m \bmod N} \chi(n) e^{2 \pi i n m / N}. $$ When $\gcd(n, N) \neq 1$, the RHS of $(1)$ is clearly $0$ and we can show the LHS is also zero.
Proof
To have different letters, I swap the roles of $m$ and $n$. We want to show that if $\gcd(m, N) \neq 1$, then $$ \sum_{n \bmod N} \chi(n) e^{2 \pi i m n / N} = 0. $$ Write $m = dM$ and $N = dN'$, where $d = \gcd(m, N)$. As $\chi$ is a primitive character, there exists $c \equiv 1 \bmod N'$ such that $\gcd(c, N) = 1$ and $\chi(c) \neq 1$. (Otherwise, $c \equiv 1 \bmod N' \implies \chi(c) = 1$; then for any $a \equiv a' \bmod N'$ with $\gcd(aa', N') = 1$, we have $a'a^{-1} \equiv 1 \bmod N' \implies \chi(a^{-1} a') = 1 \implies \chi(a) = \chi(a')$; hence $\chi$ is actually defined mod $N'$ and not primitive with conductor $N$). Collect terms in the sum over $N$ as sums over $N'$: $$ \sum_{n \bmod N} \chi(n) e^{2 \pi i n m / N} = \sum_{n \bmod N} \chi(n) e^{2 \pi i n M/N'} = \sum_{r \bmod N'} \left(\sum_{\substack{n \bmod N \\ n \equiv r \bmod N'}} \chi(n) \right) e^{2 \pi i r M/N'}. $$
Changing variables $n \mapsto cn$ (with $c$ as above) permutes the classes $n \equiv r \bmod N'$, so $$ \sum_{\substack{n \bmod N \\ n \equiv r \bmod N'}} \chi(n) = \sum_{\substack{n \bmod N \\ n \equiv r \bmod N'}} \chi(cn) = \chi(c) \sum_{\substack{n \bmod N \\ n \equiv r \bmod N'}} \chi(n), $$ and as $\chi(c) \neq 1$ this shows that this sum must be $0$.
This is a slight rephrasing of the classic proof that $\sum_{n \bmod N} \chi(n) = 0$, which is also accomplished by changing variables.
This completes the proof.