For Next App Router middleware, are we supposed to just use the unseal/seal data methods? #658
-
I get errors when calling |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey @jordanpurinton, no it's not supposed to error. But it's true I only tested reading the session in a middleware, not writing the session. What are the errors you're getting? |
Beta Was this translation helpful? Give feedback.
-
Hey there you can use the normal getIronSession in middleware, as seen here: https://github.com/vvo/iron-session/blob/main/examples/next/src/middleware.ts |
Beta Was this translation helpful? Give feedback.
Hey there you can use the normal getIronSession in middleware, as seen here: https://github.com/vvo/iron-session/blob/main/examples/next/src/middleware.ts