AuthView

fun AuthView(modifier: Modifier = Modifier, clerkTheme: ClerkTheme? = null, initialIdentifier: String? = null, initialFirstName: String? = null, initialLastName: String? = null, lockPrefilledFields: Boolean = false, persistIdentifiers: Boolean = true, preferGoogleOneTap: Boolean = true, startSocialOAuthAsSignUp: Boolean = false, unsafeMetadata: Map<String, Any>? = null, isDismissible: Boolean = true, onDismiss: () -> Unit? = null, onAuthComplete: () -> Unit = {}, mode: AuthMode = AuthMode.SignInOrUp)

Prebuilt Clerk authentication flow.

Parameters

initialIdentifier

Optional initial value for the identifier field. Phone-like values are routed to the phone number field automatically.

initialFirstName

Optional initial value for the first name field during sign-up.

initialLastName

Optional initial value for the last name field during sign-up.

lockPrefilledFields

When true, prefilled identifier and sign-up name fields are read-only.

persistIdentifiers

When false, stored auth-start identifiers are cleared and future edits are kept in memory only for the lifetime of the current view.

preferGoogleOneTap

When true, Google social auth uses native Google One Tap if configured. When false, Google social auth always uses browser OAuth.

startSocialOAuthAsSignUp

When true, browser OAuth social auth starts from a sign-up attempt and transfers back to sign-in if the selected account already exists.

unsafeMetadata

Custom metadata to attach to users created by the prebuilt sign-up flow. This metadata is not validated by Clerk and should not contain sensitive information.

isDismissible

When true, the auth start screen shows a close affordance.

onDismiss

Called when the user presses the close affordance. When omitted, the close affordance falls back to the system back dispatcher.

onAuthComplete

Called when authentication completes.

mode

Determines whether the flow starts as sign-in, sign-up, or sign-in-or-up.