0

I perform authentication with passport.js. However after session is created, after each AJAX request RoboForm asks to save password. Can't figure out what could be the reason.

Here are the headers:

Request Headers

Accept:/
Accept-Encoding:gzip, deflate, sdch, br
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:connect.sid=s%3AjvQRBQY...
Host:localhost:3000
If-None-Match:W/"140-3603896551"
Referer:http://localhost:3000/
User-Agent:Mozilla/5.0

Response Headers

Connection:keep-alive
Date:Wed, 26 Apr 2017 11:42:51 GMT
ETag:W/"140-3603896551"
X-Powered-By:Express

Example of serverside code:

app.get('/users', function(req,res) {
  if(typeof req.user == 'undefined'){
    res.status(403).end();return;
  }

  users.get(function(error,results){
    if(error !== null){
      res.json({"error":"Error getting users"})
    }else {
      res.json(results);
    }
  });
});
Maxim
  • 243
  • 3
  • 18

1 Answers1

1

This strikes me as a client-side problem. Roboform is triggered by an action on the client so in order to help more it would be good to see your Angular controller/service code.

Thanks!

  • Here is loogin code: `var options:Object = {"headers":{"Content-Type": "application/json"}}; this.http.post( '/login', JSON.stringify(this.login_info), options).map(res => res.json()).subscribe((res) => this.loginCallback(res));` – Maxim May 05 '17 at 06:15
  • Do you have all your code in a github repo? Looking at this small fragment of a service it is not possible to tell where any possible bug could be. – Steven Winston May 07 '17 at 07:00
  • Here I have created github repo: https://github.com/max-funeasylearn/promo-codes. – Maxim May 10 '17 at 07:57