-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Add applySession(req, res, options) method #41
Comments
@vincentducorps Aside from syntax difference, does using withSession works for you? If so could you explain a bit more why applySession is better for your usecase? Happy to learn more here, thanks! |
Needs a clearer example/more explanation |
…uired New features: - an Express/Connect middleware: import { ironSession } from "next-iron-session" app.use(ironSession(options)) or router.get("/", ironSession(options), (req, res, next) => {}); - import { applySession } from "next-iron-session": await applySession(req, res, options); Examples: - moved to examples/ folder - added an Express example BREAKING CHANGE: - you need to import withIronSession as a named export: before: import withIronSession from "next-iron-session" after: import { withIronSession } from "next-iron-session" - cookieName option is now mandatory (#54) fixes #54 fixes #9 fixes #41
…uired New features: - an Express/Connect middleware: import { ironSession } from "next-iron-session" app.use(ironSession(options)) or router.get("/", ironSession(options), (req, res, next) => {}); - import { applySession } from "next-iron-session": await applySession(req, res, options); Examples: - moved to examples/ folder - added an Express example BREAKING CHANGE: - you need to import withIronSession as a named export: before: import withIronSession from "next-iron-session" after: import { withIronSession } from "next-iron-session" - cookieName option is now mandatory (#54) fixes #54 fixes #9 fixes #41
🎉 This issue has been resolved in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hello,
Can you add
applySession
method just like https://github.com/hoangvvo/next-session#-applysession-I prefer this approach (like in NextJS docs https://nextjs.org/docs/api-routes/api-middlewares) instead of
withSession
.Thanks
The text was updated successfully, but these errors were encountered: