How do I show for an ideal transformer $M^2=L_1L_2$? I've been stuck on this problem for about an hour.

In an ideal transformer, the same flux passes through all turns of the primary and of the secondary . Show that in this case $M^2=L_1L_2$, where $M$ is the mutual inductance of the coils, and $L_1$, $L_2$ are their individual self-inductances.

My first instinct was the following: If we isolate the response of each coil to the other one, we get the equations $N_1\Phi_1=MI_2$ and $N_2\Phi_2=MI_1$, where $\Phi$ is magnetic flux going through a single turn of the coil and $I$ is current. Likewise, if we isolate the response of each coil to itself, we get the equations $N_1\Phi_1=L_1I_1$ and $N_2\Phi_2=L_2I_2$. I would now naturally want to say "Now just multiply $N_1\Phi_1$ and $N_2\Phi_2$ both ways, and get the desired result!" i.e.,
$$(N_1\Phi_1)(N_2\Phi_2)=(MI_2)(MI_1)=(L_1I_1)(L_2I_2)\implies M^2=L_1L_2$$
But that's incorrect, because the response of the coils to themselves and to the other coil are different quantities (i.e. not necessarily equal).
Realizing this, I write down the more general equations.
$$N_1\Phi_1=MI_2+L_1I_1$$
$$N_2\Phi_2=MI_1+L_2I_2$$
Now even with the hypothesis that $\Phi_1=\Phi_2=\Phi$, I still can't see how the identity $M^2=L_1L_2$ follows. Could you help clear up my confusion?
*Taken from D. Griffiths Introduction to Electrodynamics (4th ed.), Problem 7.58.
 A: In a perfect transformer, if we run a current through either the primary or secondary coils, we are guaranteed in the quasistatic case that $\Phi_1=\Phi_2$ for each individual turn of the coils. Now suppose we ran a current $I_1$ through the primary coil, and waited long enough so that $I_1$ was steady and $I_2$ (current induced on second coil) was zero. we could multiply both sides of that equation by $N_1/I_1$ ($N_1$ is the number of turns in the primary coil) and see that
$$\frac{N_1}{I_1}\Phi_1=\frac{N_1}{I_1}\Phi_2\longrightarrow L_1=\frac{N_1}{N_2}M$$
Where we have used the identities $N_2\Phi_2=M I_1$ ($M$ is mutual inductance) and $N_1\Phi_1=L_1I_1$ ($L_1$ is the self-inductance of the primary coil). Likewise, if we had reversed the roles of the primary and secondary coil, we would get the analagous result
$$L_2=\frac{N_2}{N_1}M$$
Multiplying those two results together gives the desired identity.
$$L_1L_2=\frac{N_1}{N_2}\frac{N_2}{N_1}M^2=M^2$$
It's interesting to note that, in the general case (i.e. two coils that aren't part of an ideal transformer), if we run a current through the first coil, we get $\Phi_1\geq\Phi_2$. This is because all the field lines pass through the first coil itself, but not all the field lines have to pass through the second coil (they could pass outside of it). Propogating this inequality down the previous steps shows that in the general case,
$$L_1L_2\geq M^2$$
