Bypass passport authentication on server-side GET requests

281 views Asked by At

Technology: nodejs server/express 4 framework

I'm struggling with finding a way to bypass the passport authentication when making a localhost GET request. The "body" part of the response is the login page instead of data. I'd like to just query the data directly with no redirect to login because the call is made server-side.

This is my code:

request({
        url: "http://localhost:3000/data/getMyData/"+dataName,
        method:"GET",
    },
    function(error,response,body){
       console.log(body)
    }
)
0

There are 0 answers