AuthResult.cancelled constructor

AuthResult.cancelled({
  1. String message = 'Authentication was cancelled by the user',
  2. Map<String, dynamic> metadata = const {},
})

Creates a cancelled authentication result (user cancelled the flow)

Implementation

factory AuthResult.cancelled({
  String message = 'Authentication was cancelled by the user',
  Map<String, dynamic> metadata = const {},
}) {
  return AuthResult._(
    success: false,
    cancelled: true,
    error: FrappeUserCancelledException(message),
    metadata: metadata,
  );
}