vvo / iron-session

🛠 Secure, stateless, and cookie-based session library for JavaScript
https://get-iron-session.vercel.app
MIT License
3.65k stars 251 forks source link

TypeError: session.updateConfig is not a function #744

Closed tobyab closed 4 months ago

tobyab commented 5 months ago

I cannot for the life of me figure out why this isn't working! I'd love some help with this.

Function that's causing the problem:

session.updateConfig({
      cookieName: "google-token",
      password: process.env.SESSION_SECRET,
});

Produces the error "TypeError: session.updateConfig is not a function"
export const googleSessionOptions: SessionOptions = {
  cookieName: "google-token",
  password: process.env.SESSION_SECRET,
  cookieOptions: {
    httpOnly: true,
    path: "/",
    secure: process.env.NODE_ENV === "production",
    sameSite: "strict",
  },
};

Running version: 8.0.1

I'll keep working on this and keep you posted if I get a solution! Would love some extra documentation on this though :)

vvo commented 4 months ago

Fixed in 8.0.2