Skip to content

NodeSSPI called several times in one request #64

@suckerp

Description

@suckerp

Hi,

I'm using NodeSSPI as a global middleware in my Express backend (port 3000) just like in your example alongside an Angular frontend (port 4200). I added a console.log(err) inside the nodeSSPIObj.authenticate to see what the error is like.
Now everytime I make a call to the backend I get at least 3 times "undefined" in the express console which means the middleware is called that many times during a single call. No matter what browser I use (IE, Firefox or Chrome).

Then I made a simple test and created a test route in the backend and even if I call it directly with localhost:3000/test NodeSSPI is called 3 times. And at least once on every reload or if I go to another route manually.

Is this expected the behaviour? I was under the impression it should only be called once when you call the backend the first time and because perRequestAuth is set to false on default it shouldn't be called again after that until you restart the browser.
Afterall if retrieveGroups is set to true it would also be called on each of the 3+ initial calls and on all other calls later.
Or am I not understandig the way it should work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions