Firebase Sign In with prebuilt UI Auth

// Choose authentication providers
List<AuthUI.IdpConfig> providers = Arrays.asList(
       
new AuthUI.IdpConfig.EmailBuilder().build(),
       
new AuthUI.IdpConfig.PhoneBuilder().build(),
       
new AuthUI.IdpConfig.GoogleBuilder().build(),
       
new AuthUI.IdpConfig.FacebookBuilder().build(),
       
new AuthUI.IdpConfig.TwitterBuilder().build());

// Create and launch sign-in intent
startActivityForResult
(
       
AuthUI.getInstance()
               
.createSignInIntentBuilder()
               
.setAvailableProviders(providers)
               
.build(),
        RC_SIGN_IN
);


dependencies {
   
// ...

    implementation
'com.firebaseui:firebase-ui-auth:6.2.0'

   
// Required only if Facebook login support is required
   
// Find the latest Facebook SDK releases here: https://goo.gl/Ce5L94
    implementation
'com.facebook.android:facebook-android-sdk:4.x'

   
// Required only if Twitter login support is required
   
// Find the latest Twitter SDK releases here: https://goo.gl/E5wZvQ
    implementation
'com.twitter.sdk.android:twitter-core:3.x'
}

Comments