GoogleButtonUiContainerFirebase
fun GoogleButtonUiContainerFirebase(modifier: Modifier = Modifier, linkAccount: Boolean = false, filterByAuthorizedAccounts: Boolean = false, scopes: List<String> = listOf("email", "profile"), onResult: (Result<FirebaseUser?>) -> Unit, content: @Composable UiContainerScope.() -> Unit)
GoogleSignInButton Ui Container Composable that handles all sign-in functionality for Google. Child of this Composable can be any view or Composable function. You need to call UiContainerScope.onClick function on your child view's click function.
Parameters
linkAccount
Default value is false
filterByAuthorizedAccounts
set to true so users can choose between available accounts to sign in.
scopes
Custom scopes to retrieve more information. Default value listOf("email", "profile") onResult callback will return Result with FirebaseUser type.
Example Usage:
//Github Sign-In with Custom Button and authentication with Firebase
GoogleButtonUiContainerFirebase(onResult = onFirebaseResult) {
Button(onClick = { this.onClick() }) { Text("Google Sign-In (Custom Design)") }
}
Content copied to clipboard
fun GoogleButtonUiContainerFirebase(modifier: Modifier = Modifier, onResult: (Result<FirebaseUser?>) -> Unit, content: @Composable UiContainerScope.() -> Unit)
Deprecated
Use GoogleButtonUiContainerFirebase with linkAccount and filterByAuthorizedAccounts parameters, which defaults to false