signJWT method

  1. @override
Future<String> signJWT(
  1. String aud
)
override

Implementation

@override
Future<String> signJWT(String aud) async {
  _checkInitialized();

  final Uint8List seed = await _getClientSeed();
  final RelayAuthKeyPair keyPair = await relayAuth.generateKeyPair(seed);
  final String sub = utils.generateRandomBytes32();
  final jwt = await relayAuth.signJWT(
    sub: sub,
    aud: aud,
    ttl: ReownConstants.ONE_DAY,
    // iat: DateTime.now().millisecondsSinceEpoch ~/ 1000,
    keyPair: keyPair,
  );
  return jwt;
}