AuthPhoneNumberUserFactory<TContext> typedef

AuthPhoneNumberUserFactory<TContext> = FutureOr<AuthUser> Function(TContext context, String phoneNumber, String? name)

Builds candidate user data for backend-owned sign-up.

This callback must not persist the user or perform other durable side effects. AuthPhoneNumberBackend.verifyPhoneNumberCode owns creation, phone binding, verified projection, and challenge consumption atomically.

Implementation

typedef AuthPhoneNumberUserFactory<TContext> =
    FutureOr<AuthUser> Function(
      TContext context,
      String phoneNumber,
      String? name,
    );