Skip to content

Commit

Permalink
fix(nuxt): Support async middleware handler (#4888)
Browse files Browse the repository at this point in the history
  • Loading branch information
IceHugh authored Jan 16, 2025
1 parent e627890 commit c092f49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/heavy-suns-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/nuxt": patch
---

Support async middleware handler
2 changes: 1 addition & 1 deletion packages/nuxt/src/runtime/server/clerkMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const clerkMiddleware: ClerkMiddleware = (...args: unknown[]) => {
// Internal serializable state that will be passed to the client
event.context.__clerk_initial_state = createInitialState(authObject);

handler?.(event);
await handler?.(event);
});
};

Expand Down

0 comments on commit c092f49

Please # to comment.