Firebase Authentication connect Email with Phone

前端 未结 1 1090
傲寒
傲寒 2020-12-16 15:12

I am currently using Email and Phone number authentication using Firebase.

And i have 3 EditText for:

相关标签:
1条回答
  • 2020-12-16 15:29

    Depending on whether you want to allow for signing in with either email or phone number, or if you want to allow for the Phone number to be used as a second factor, for sign in, there are different solutions.

    If you just want to have the Phone number be a second way to sign in, you can link the credentials using the linkWithCredential method on your Firebase User. This way you can add as many ways to sign in, as you want. Firebase has a good guide on this.

    If you want the phone number to be a second factor of authentication, you will need to have a custom auth provider, which does the second factor authentication. There is also a getting started guide on this, however the 2 Factor Authentication part itself would be up to you.

    0 讨论(0)
提交回复
热议问题