I'm using the express-jwt module on my node.js server to authorize users access to different requests. One of the request will ultimately be a file download with express res.download(file).
The problem is that I can't do the request as I would usually do via AJAX (angular $http.get), as this will not trigger the required file download popup in the browser. Without AJAX though (window.open), I can't provide the necessary authorization header for express-jwt.
Any hint on how I can achieve my authorized file download from node.js with express and jwt-express?