public async Task CheckIfPasswordHasExpired(string userId) { try { await _userDomainService.CheckIfPasswordHasExpired(userId, _passwordConfiguration.ActivePeriodInDays); } catch (NetKitAuthConflictException ex) { await SendResetPasswordEmailAsync(userId, EmailPurposeEnum.PasswordExpiration); throw new NetKitAuthUnauthorizedException(ex.ErrorCode, ex.Message, ex.InnerException); } }