12. Given the hyperbola $\frac{x^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1$ with the left vertex $A$ and the right focus $F$. Let $P$ be any point on the hyperbola in the first quadrant. If $\angle P F A=2 \angle F A P$ always holds, then the eccentricity $e$ of the hyperbola is
12.2.

From the problem, we can take a point $P$ on the hyperbola such that $P F$ is perpendicular to the $x$-axis, giving $P(c, y)$.
Then $\frac{c^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1$. Hence, $y^{2}=\frac{b^{4}}{a^{2}}$.
Since $y>0$, we have $y=\frac{b^{2}}{a}=\frac{c^{2}-a^{2}}{a}$.
Given that $\angle P F A=2 \angle F A P=\frac{\pi}{2}$, we know that $\triangle A F P$ is an isosceles triangle, so $A F=P F$, which means $a+c=\frac{c^{2}-a^{2}}{a}$.
Rearranging gives $c^{2}-a c-2 a^{2}=0$, or
$e^{2}-e-2=0$.
Since $e>1$, solving gives $e=2$.