Skip to content

Commit d25aefe

Browse files
authored
fix: correctly set defaults for route handlers (#11213)
1 parent 8ea51aa commit d25aefe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/next-auth/src/lib/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ export function initAuth(
155155
return async (
156156
...args: Parameters<NextAuthMiddleware | AppRouteHandlerFn>
157157
) => {
158-
return handleAuth(args, config(args[0]), userMiddlewareOrRoute)
158+
const _config = config(args[0])
159+
onLazyLoad?.(_config)
160+
return handleAuth(args, _config, userMiddlewareOrRoute)
159161
}
160162
}
161163
// API Routes, getServerSideProps

0 commit comments

Comments
 (0)