Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt

Use this file to discover all available pages before exploring further.

Class Email sign-in widget with OTP verification, matching the official Crossmint RN SDK email auth flow.
class CrossmintEmailSignIn extends StatefulWidget
Step 1: email input → calls CrossmintAuthClient.sendEmailOtp. Step 2: 6-char OTP code → calls CrossmintAuthClient.confirmEmailOtp. The state machine lives in CrossmintEmailSignInViewModel, which can be supplied via viewModel for testing or to share state with a custom UI. When omitted, the widget constructs and owns its own view model for the duration of its State lifetime.

Constructors

CrossmintEmailSignIn

const CrossmintEmailSignIn({
  super.key,
  required this.auth,
  this.viewModel,
  this.otpTitle,
  this.onAuthenticated,
  this.onError,
})

Properties

auth

final CrossmintAuthClient auth

viewModel

final CrossmintEmailSignInViewModel? viewModel
Optional view model override. When null, the widget constructs a fresh CrossmintEmailSignInViewModel bound to auth and disposes it with the widget. When provided, the widget observes the view model but does not dispose it — the caller owns the lifecycle.

otpTitle

final String? otpTitle
Custom title for the OTP verification step. Defaults to 'Check your email'.

onAuthenticated

final VoidCallback? onAuthenticated

onError

final void Function(Object error)? onError

Methods

createState

State<CrossmintEmailSignIn> createState()