login static method

Future<IICaller> login({
  1. Duration valid_duration = const Duration(days: 30),
  2. String? derivation_origin,
  3. String ii_url = 'https://identity.ic0.app',
})

Performs the internet-identity login flow with a SubtleCrypto session key with the extractable property set to false for the highest security.

Implementation

static Future<IICaller> login({Duration valid_duration = const Duration(days: 30), String? derivation_origin, String ii_url = 'https://identity.ic0.app'}) async {
    SubtleCryptoECDSAP256Keys session_keys = await SubtleCryptoECDSAP256Keys.new_keys();
    List<Legation> legations = await ii_login(
        session_public_key_DER: session_keys.public_key_DER,
        valid_duration: valid_duration,
        derivation_origin: derivation_origin,
        ii_url: ii_url
    );
    return IICaller(
        keys: session_keys,
        legations: legations
    );
}