Turns out that when configuring Google sign-in on Firebase, there is an optional field: Safelist client IDs from external projects (optional). I added my client ID here and saved it, and everything is now working fine.