3
votes

As an admin I want to create a user with an email as a identifier. I know that is possible by using firebase-admin 'create User'. The problem is that it is then only available through email/password provider, and I can not figure out how to add a Facebook provider when creating a user. Is it even possible?

I know also that I can link providers but for that user will have to login with email/password first anyway, which is not optimal.

So I want to create a user with an email identifier but accessible through facebook login (firebase).

How can I achieve that?

1
If he signs up with Facebook, you can get his email then prompt him to enter a password. Unless of course, you have a backend, then you can use your Facebook application secret key to check if the user is already login or not. You can send the id of its profile to firebase to save it and whenever he login using facebook you only check if the ID exists, but this is not recommended by Facebook. They recommend using backend + frontend method. And only use tokens never use ID. - mohessaid

1 Answers

1
votes

Creating Facebook users is currently not possible via Admin SDK. You can do so using the Firebase CLI SDK: https://firebase.google.com/docs/cli/auth#authimport