Firebase Auth using phone number and password

前端 未结 4 1375
抹茶落季
抹茶落季 2021-02-04 14:11

I am developing Android app using Firebase. Because of that, I want to use Firebase Auth. I have following requirements:

  • Register/Log in using Facebook
  • Re
4条回答
  •  孤城傲影
    2021-02-04 14:52

    If you have both email and phone of your user and you can use Admin SDK, then perhaps you could exchange users phone number to his email and login with email and password in the background.

    Something like this (node.js)

    admin.auth().getUserByPhoneNumber(phoneNumber)
        .then(user => {
            firebase.auth().signInWithEmailAndPassword(user.email, password);
        });
    

提交回复
热议问题