It would be nice to have some context as to what firebase is here. Presumably it’s some sort of injected entity, but I have no idea which one. Have you looked at baumblatt/capacitor-firebase-auth?
As far as my experience allows, I dont think you can control the popup behavior of the authentication provider in the javascript SDK.
So you indeed need to resort to capacitor/cordova based approach, using someone else’s plugin or build your own. I pretty sure this problem has been resolved earlier. But no experience from my end. I have used Eddy van Bruggen plugin which also does a popup, I believe.