2.x to 3.x of the Auth0 Next.js SDK.
Node 16 or Newer Required
TypeScript Changes
All the server functions of this SDK now support the App Router in addition to the Page Router. As a result of this, the type signatures of these functions have been overloaded to include the App Router signatures. So in some places, TypeScript may require help inferring the types of request and response.- Before (v2)
- After (v3)
The /401 Handler Has Been Removed
If you want to protect an API with withMiddlewareAuthRequired you will need a minimum of Next.js 13.1, or add the 401 back yourself:
Using Middleware on Next 12 Requires Custom Webpack Config
You need to ignore them from your webpack config:It’s safe to ignore these modules as you will not hit these code paths using Next.js 12.