We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
handleMiddleware
NextMiddlewareResult
1 parent 70ffa65 commit 8853000Copy full SHA for 8853000
packages/next-auth/src/next/middleware.ts
@@ -92,10 +92,12 @@ export interface NextAuthMiddlewareOptions {
92
secret?: string
93
}
94
95
+type NextMiddlewareResult = ReturnType<NextMiddleware>
96
+
97
async function handleMiddleware(
98
req: NextRequest,
99
options: NextAuthMiddlewareOptions | undefined,
- onSuccess?: (token: JWT | null) => Promise<any>
100
+ onSuccess?: (token: JWT | null) => Promise<NextMiddlewareResult>
101
) {
102
const signInPage = options?.pages?.signIn ?? "/api/auth/signin"
103
const errorPage = options?.pages?.error ?? "/api/auth/error"
0 commit comments