postLoginDId method

  1. @override
Future<SDNDIDLoginResponse> postLoginDId({
  1. required String type,
  2. required String updated,
  3. Map<String, dynamic>? identifier,
  4. String? random,
  5. String? random_server,
  6. ClientPublicKey? client_key,
})

Implementation

@override
Future<SDNDIDLoginResponse> postLoginDId(
    {required String type,
    required String updated,
    Map<String, dynamic>? identifier,
    String? random,
    String? random_server,
    ClientPublicKey? client_key}) async {
  // if (node == null) {
  //   final domain = identifier is AuthenticationUserIdentifier
  //       ? identifier.user.domain
  //       : null;
  //   if (domain != null) {
  //     await checkNode(Uri.https(domain, ''));
  //   } else {
  //     throw Exception('No node specified!');
  //   }
  // }
  final response = await super.postLoginDId(
      type: type,
      updated: updated,
      identifier: identifier,
      random: random,
      random_server: random_server,
      client_key: client_key);

  // Connect if there is an access token in the response.
  final accessToken = response.access_token;
  final userId = response.user_id;
  final device_id = response.device_id;
  await init(
    newToken: accessToken,
    newUserID: userId,
    newDeviceID: device_id,
  );
  return response;
}