working on a nodejs project and using below method of authentication every time i refresh page it redirect me back to sign in page .
code:
module.exports =