Feature Request: First-class proxy.ts support following Next.js 16+ conventions
Summary
Next.js 16+ has deprecated middleware.ts in favor of proxy.ts as the standard file convention for server-side request handling. While the current library documentation mentions this change, the API still centers around authkitMiddleware naming, which could be confusing for developers adopting the new conventions.
Current State
The library exports authkitMiddleware() and requires renaming files manually:
// From README: "The code remains the same; only the filename and export name differ"
import { authkitMiddleware } from '@workos-inc/authkit-nextjs';
export default authkitMiddleware();
Suggested Improvements
- Add
authkitProxy export as an alias or replacement for authkitMiddleware to align with Next.js 16+ naming
- Update composable function names - the
authkit() helper is good, but handleAuthkitHeaders() could have a proxy-equivalent name
- Consider deprecation warnings when using
authkitMiddleware on Next.js 16+
Example of desired API
// proxy.ts (Next.js 16+)
import { authkitProxy } from '@workos-inc/authkit-nextjs';
export default authkitProxy();
References
Environment
@workos-inc/authkit-nextjs: latest
- Next.js: 16+
Feature Request: First-class
proxy.tssupport following Next.js 16+ conventionsSummary
Next.js 16+ has deprecated
middleware.tsin favor ofproxy.tsas the standard file convention for server-side request handling. While the current library documentation mentions this change, the API still centers aroundauthkitMiddlewarenaming, which could be confusing for developers adopting the new conventions.Current State
The library exports
authkitMiddleware()and requires renaming files manually:Suggested Improvements
authkitProxyexport as an alias or replacement forauthkitMiddlewareto align with Next.js 16+ namingauthkit()helper is good, buthandleAuthkitHeaders()could have a proxy-equivalent nameauthkitMiddlewareon Next.js 16+Example of desired API
References
authkitMiddlewarewithmiddlewareAuthoptionEnvironment
@workos-inc/authkit-nextjs: latest