Skip to content

Commit

Permalink
fix: correctly set defaults for route handlers (#11213)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpulec authored Jul 2, 2024
1 parent 8ea51aa commit d25aefe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/next-auth/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ export function initAuth(
return async (
...args: Parameters<NextAuthMiddleware | AppRouteHandlerFn>
) => {
return handleAuth(args, config(args[0]), userMiddlewareOrRoute)
const _config = config(args[0])
onLazyLoad?.(_config)
return handleAuth(args, _config, userMiddlewareOrRoute)
}
}
// API Routes, getServerSideProps
Expand Down

0 comments on commit d25aefe

Please sign in to comment.