Skip to content

Instantly share code, notes, and snippets.

@malikkurosaki
Created October 26, 2019 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malikkurosaki/44ccc10e8fa15769d56752eb7b094fc6 to your computer and use it in GitHub Desktop.
Save malikkurosaki/44ccc10e8fa15769d56752eb7b094fc6 to your computer and use it in GitHub Desktop.
firebase ui login

firebase ui login

  // firebase
    implementation 'com.google.firebase:firebase-core:17.2.0'
    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    implementation 'com.google.firebase:firebase-auth:19.1.0'
    implementation 'com.google.firebase:firebase-database:19.2.0'
    implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
    
private List<AuthUI.IdpConfig> providers = Collections.singletonList(
          new AuthUI.IdpConfig.GoogleBuilder().build());
  private int RC_SIGN_IN = 500;
    
 tombolLogin.setOnClickListener(v->{
        startActivityForResult(
                AuthUI.getInstance()
                        .createSignInIntentBuilder()
                        .setAvailableProviders(providers)
                        .build(),
                RC_SIGN_IN);
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment