@clerk/express@2.1.0
📦 clerkView on GitHub →
⚡ 1 deprecations🔧 3 symbols
Summary
This release deprecates the `requireAuth()` middleware in favor of more explicit authentication handling using `clerkMiddleware` and `getAuth`. Dependencies were also updated.
Migration Steps
- Replace usage of the deprecated `requireAuth()` middleware with `clerkMiddleware()` and manually check authentication status using `getAuth(req)` within your route handlers to return explicit 401 responses when necessary.
Affected Symbols
⚡ Deprecations
- The `requireAuth()` middleware is deprecated and will be removed in the next major version. It redirects unauthenticated requests, which is often undesirable for API routes. Use `clerkMiddleware()` combined with `getAuth()` for explicit control over authentication responses.