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.
Answered by
vvo
Jun 14, 2024
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.
2 replies
-
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.
0 replies
Answer selected by
vvo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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