authWithKeyPair method

Future<KeyPair?> authWithKeyPair(
  1. KeyPair pair
)

Returns properties (public/private keys) of the logged user. If the auth failed, returns null.

Implementation

Future<KeyPair?> authWithKeyPair(KeyPair pair) {
  final completer = Completer<KeyPair?>();
  _user.auth(pair, allowInterop(
    (Object data) {
      final KeyPair? sea = getProperty(data, 'sea');
      completer.complete(sea);
    },
  ));
  return completer.future;
}