Created
March 9, 2020 15:10
-
-
Save oradkovsky/1ac7c4054e41fdb3a64ce6388003a19a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (FirebaseAuth.getInstance().currentUser == null) { | |
// user needs to authenticate | |
val providers = arrayListOf( | |
AuthUI.IdpConfig.GoogleBuilder().build() | |
) | |
startActivityForResult( | |
AuthUI.getInstance() | |
.createSignInIntentBuilder() | |
.setAvailableProviders(providers) | |
.build(), | |
RQ_FIREBASE_AUTH | |
) | |
} else { | |
//user is authenticated | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment