Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when setting maxAge = 'session' #203

Open
vicb opened this issue Oct 7, 2020 · 0 comments
Open

Issue when setting maxAge = 'session' #203

vicb opened this issue Oct 7, 2020 · 0 comments

Comments

@vicb
Copy link

vicb commented Oct 7, 2020

Everything is fine when I set maxAge to a number.

As soon as I set maxAge to "session" I get a REDIS error:

  ReplyError$1: ERR value is not an integer or out of range

I have launched my app with redis traces:

DEBUG=ioredis:* node app/server.js

And I see the error at this point:

  ioredis:redis write command[35.224.153.24:18918]: 0 -> setex('ee336b93-7195-4e06-9e66-dffedbda5466,session,{"grant":{"provider":"google","dynamic":{"x":"151","y":"26"},"state":"98709c21509fd43b0c2ec39071816bebaf0f4368","nonce":"9de36d71dfba5d70310464eee0c4f3a486 ... <REDACTED full-length="763">') +8s

This is how I setup the session:

app
  .use(
    session(
      {
        store: redisStore({
          host: redisUrl.hostname,
          port: Number(redisUrl.port),
          password: redisUrl.password,
        }),
        maxAge: 'session',
        key: 'flyxc.sess',
        httpOnly: true,
        signed: true,
        rolling: false,
        renew: false,
        secure: process.env.NODE_ENV != 'development',
      },
      app,
    ),
  )

Any clue what could go wrong or how to debug further ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant