PasskeySignInButton

fun PasskeySignInButton(state: PasskeySignInState, onSignedIn: (PasskeyAssertion) -> Unit, modifier: Modifier = Modifier, onError: (PasskeyError) -> Unit = {}, enabled: Boolean = true, content: @Composable RowScope.() -> Unit = { Text("Sign in with a passkey") })

A Material 3 button that signs in with a passkey.

Tapping it calls PasskeySignInState.signIn. While the request runs the button is disabled and shows a small progress indicator before content.

Parameters

onSignedIn

called with the assertion to send to your server.

modifier

applied to the button.

onError

called for every failure except PasskeyError.Cancelled (the user dismissing the sheet). The same error is also available as PasskeySignInState.lastError.

enabled

whether the button can be tapped; it is also disabled while a sign-in is running.

content

the button label; defaults to "Sign in with a passkey".