firebase google authentication opens up browser instead of in-app google login screen?

I integrated google login through firebase in my ionic app.


The above line of code seems to open up a browser window in android phone instead of an in app google login screen.

Is this wrong approach?

I suspect that I need to follow :

But does that mean I have to write code in java? What if I don’t know Java and want to do this with javascript? Is it possible?

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.

import * as firebase from 'firebase';
Which a npm package: "firebase": "^7.22.0",

That seems to me to be the Javascript SDK, not a plugin.