auth method

Future<KeyPair?> auth(
  1. String username,
  2. String password
)

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

Implementation

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