FirebaseUI-Android icon indicating copy to clipboard operation
FirebaseUI-Android copied to clipboard

i want only phone number authentication

Open dlaravindhan opened this issue 8 years ago • 3 comments

how to change only phone number authentication please give me source code

dlaravindhan avatar Dec 29 '17 13:12 dlaravindhan

You can use below snippet to sign in only with phone number and it will directly open phone number activity instead of default activity of this library which shows all the different options to log in.

startActivityForResult(
    AuthUI.getInstance()
        .createSignInIntentBuilder()
        .setAvailableProviders(
                Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.PHONE_VERIFICATION_PROVIDER).build()))
        .build(),
    RC_SIGN_IN);

It means if you have enabled only one way to sign in, this library will not show custom activity with one option. If you enable more than one way to sign in, then only it will show custom activity with all sign in options. I am using the same code in my app.

thakkaryash94 avatar Dec 30 '17 09:12 thakkaryash94

thanks lot man

dlaravindhan avatar Jan 02 '18 05:01 dlaravindhan

Thanks @thakkaryash94 !

samtstern avatar Jan 02 '18 16:01 samtstern