Sumit Sharma
Sumit Sharma

Reputation: 212

Keystone-6 Session issue on refresh. Session token is not valid after refresh

Recently updated to @keystone-6/core@^6.1.0 and facing this issue token is not valid after any entry in list or page refresh.

const { withAuth } = createAuth({
  listKey: 'User',
  identityField: 'phone',
  sessionData: 'name id email phone userType',
  secretField: 'password',
  initFirstItem: {
    fields: ['name', 'phone', 'password'],
  },
});
const sessionMaxAge = 60 * 60 * 24 * 30;
const session = statelessSessions({
  maxAge: sessionMaxAge,
  secret: sessionSecret!,
});

export { withAuth, session };

Already have session secret in env file.

Upvotes: 0

Views: 33

Answers (0)

Related Questions