public async Task DisableUserAsync(Guid key) { var request = new AdminDisableUserRequest { Username = $"{key}", UserPoolId = _cognito.UserPool.Id }; await _provider.AdminDisableUserAsync(request); }
public async Task SetAccountEable(string id, bool enabled) { if (enabled) { var request = new AdminEnableUserRequest { UserPoolId = Configurations.Cognito.CognitoPoolId, Username = id }; await provider.AdminEnableUserAsync(request); } else { var request = new AdminDisableUserRequest { UserPoolId = Configurations.Cognito.CognitoPoolId, Username = id }; await provider.AdminDisableUserAsync(request); } }