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

How can I access session ? #164

Open
krishnaTORQUE opened this issue Jan 6, 2022 · 0 comments
Open

How can I access session ? #164

krishnaTORQUE opened this issue Jan 6, 2022 · 0 comments

Comments

@krishnaTORQUE
Copy link

Can anyone please tell me how can I access session ?

import session from 'koa-session';

const sessionParser: any = session(
    {
      key: process.env.SESSION_SECRET || '',
      maxAge: 1000 * 86400,
      overwrite: true,
      rolling: true,
      renew: true,
      httpOnly: true,
      signed: true,
      secure: process.env.NODE_ENV === 'production',
      sameSite: process.env.NODE_ENV === 'production',
    },
    app,
  );
  app.use(sessionParser);
  app.ws.use(sessionParser);

Not getting any session

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