Middleware NextRequest params type error #4817
Labels
bug
Something isn't working
documentation
Relates to documentation
middleware
Related to middleware
TypeScript
Issues relating to TypeScript
upstream
The issue dervies from one of next-auth dependencies
What is the improvement or update you wish to see?
https://next-auth.js.org/configuration/nextjs#wrap-middleware
In this documentation, wrap middleware get
req: NextRequest & { nextauth: { token: JWT | null } }
but this code got typescript error.Is there any context that might help us understand?
I think this issue has some options.
NextMiddlewareWithJWT
@ts-ignore
( for workaround )Does the docs page already exist? Please link to it.
https://next-auth.js.org/configuration/nextjs#wrap-middleware
The text was updated successfully, but these errors were encountered: