0
votes

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);
    }
  });
});
1
This question is unclear - Dan Green-Leipciger
@DanGreen-Leipciger When you login to a website, browser or RoboForm(if installed) asks if password should be stored. With my app after user loggs in each time ajax request is sent to the server, RoboForm asks to store the password. By the way this happens only if I send get request with angular2 Http, not jQuery $.get() - Maxim
@DanGreen-Leipciger I've added serverside code to question - Maxim
I think this is a client side problem (Angular2). If you are getting one behaviour with angular2 http and jQuery $.get() - Dan Green-Leipciger
@DanGreen-Leipciger definitely, RoboForm triggers if I click a link which does not point anywhere - Maxim

1 Answers

1
votes

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!