GithubButtonUiContainer
fun GithubButtonUiContainer(modifier: Modifier = Modifier, requestScopes: List<String> = listOf("user:email"), customParameters: Map<String, String> = emptyMap(), linkAccount: Boolean = false, onResult: (Result<FirebaseUser?>) -> Unit, content: @Composable UiContainerScope.() -> Unit)
GithubButton Ui Container Composable that handles all sign-in functionality for Github. 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.
onResult callback will return Result with FirebaseUser type.
Parameters
requestScopes
Request Scopes that is provided in Github OAuth. By Default, user's email is requested.
customParameters
Custom Parameters that is provided in Github OAuth.
linkAccount
Boolean flag to link account with current user. Default value is false.
Example Usage:
//Github Sign-In with Custom Button and authentication with Firebase
GithubButtonUiContainer(onResult = onFirebaseResult) {
Button(onClick = { this.onClick() }) { Text("Github Sign-In (Custom Design)") }
}
Content copied to clipboard
fun GithubButtonUiContainer(modifier: Modifier = Modifier, requestScopes: List<String> = listOf("user:email"), customParameters: Map<String, String> = emptyMap(), onResult: (Result<FirebaseUser?>) -> Unit, content: @Composable UiContainerScope.() -> Unit)
Deprecated
Use GithubButtonUiContainer with linkAccount parameter, which defaults to false