getAwsCredentials method

Future<void> getAwsCredentials(
  1. dynamic token, [
  2. String? authenticator
])

Get AWS Credentials for authenticated user

Implementation

Future<void> getAwsCredentials(token, [String? authenticator]) async {
  if (!(expireTime == null ||
      DateTime.now().millisecondsSinceEpoch > expireTime! - 60000)) {
    return;
  }

  final identityId = CognitoIdentityId(_identityPoolId, _pool,
      token: token, authenticator: authenticator);
  await _getAwsCredentials(identityId);
}