I've a web application built using firebase. In my web app, I've google, firebase, twitter signup/signin functionalities.
Now I want to integrate this with my api.ai agent and have a seamless account linking. Hence users will use their googel Home/ assistant app from mobile devices to connect to my agent. At this stage, I'll have the google account Id, google email, name of user.
If user already present, I can send the tokens required by my agent. But if the user is new, I want to create the account in my firebase database. I couldn't find a possibility to create a federated account in firebase manually (from nodejs application/ cloud function)!
I know there is a possibility to create a email + dummy password account but that is not what I am looking for. Because the user registered with dummy password when trying to login to my web app, would use their google signin feature.
If I create email and dummy password, the flow is not good and I've to force users to change password and link their google accounts again when they come to my web channel!
There is CLI approach, where I can import users from the file. If this is a possibility can someone please help me how I can get this done in a cloud function?