Package-level declarations

Types

Link copied to clipboard
data class GoogleAuthCredentials(val serverId: String, val redirectUri: String = "http://localhost:8080/callback")

Google Auth Credentials holder class.

Link copied to clipboard

Google Auth Provider class

Link copied to clipboard

Provider class for Google Authentication UI part. a.k.a signIn

Link copied to clipboard
data class GoogleUser(val idToken: String, val accessToken: String? = null, val email: String? = null, val displayName: String = "", val profilePicUrl: String? = null, val serverAuthCode: String? = null)

GoogleUser class holds most necessary fields

Functions

Link copied to clipboard
fun GoogleButtonUiContainer(modifier: Modifier = Modifier, filterByAuthorizedAccounts: Boolean = false, isAutoSelectEnabled: Boolean = true, scopes: List<String> = BASIC_AUTH_SCOPE, onGoogleSignInResult: (GoogleUser?) -> Unit, content: @Composable UiContainerScope.() -> Unit)

Legacy container API for Google Sign-In. Superseded by rememberGoogleSignInState, which returns a com.mmk.kmpauth.core.SignInState you can wire to any clickable without the receiver-scope indirection.

Link copied to clipboard
fun rememberGoogleSignInState(filterByAuthorizedAccounts: Boolean = false, isAutoSelectEnabled: Boolean = true, scopes: List<String> = BASIC_AUTH_SCOPE, requestAccessToken: Boolean = false, onResult: (Result<GoogleUser>) -> Unit): SignInState

Google Sign-In (without any backend) as a Compose state holder. Make sure GoogleAuthProvider.create was called at application start.