OL Learn

NodeJS timeout multiple times a day

Have a customer who use the NodeJS to print jobs.
They use their AD credentials to login.
Multiple times a day they need to login.

I have changed the default value in the default.js.
exports.DEFAULT_SESSION_TTL = 1000 * 60 * 60 * 9; //Should be 9 hours

Then why do they still need to login multiple times a day, they do not close the browser ?

I’ll be honest, this is a bit outside of my realm of expertise, but it may be helpful if you can provide some more information so others can help. Normally we don’t recommend altering the configs for NodeJS unless it’s to fix a specific bug.

What’s your main goal here? Are you attempting to set up an SSO so that users don’t need to enter credentials they access a page? What’s serving up the page? Is it Workflow, or is there something in front of it like WordPress?

The workflow controls the webpage.
And uses log in with AD credentials.
Then they get a job list the workflow generates.
But the login page comes multiple times a day, even though the user never closes the browser.
That is why the is changed in the NodeJs file - but it did not help.

If you want the session to last for as long as the browser remains open, then the default value of 0 for the DEFAULT_SESSION_TTL parameter does just that. No need to change it.

Since you are linking the session to AD credentials, I would suspect the Active Directory has its own session timeout, which the NodeJS server cannot override. You might want to ask your IT department about it.