Commit 2ee7aba
committed
fix: correct Clerk auth.protect() usage in middleware
The auth parameter in clerkMiddleware is of type AuthFn, which has
protect() as a direct method. No need to call auth() first.
Changed: await auth().protect() → await auth.protect()
This fixes TypeScript error:
Property 'protect' does not exist on type 'Promise<SessionAuthWithRedirect>'
Verified with: npm run typecheck (passes cleanly)1 parent 79844d2 commit 2ee7aba
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments