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.
2 parents 6402def + 7daf3ee commit 137ac8dCopy full SHA for 137ac8d
apps/docs/libraries/ts/nextjs.mdx
@@ -39,7 +39,7 @@ Protecting API routes is as simple as wrapping them with the `withUnkey` handler
39
import { NextRequestWithUnkeyContext, withUnkey } from "@unkey/nextjs";
40
41
export const POST = withUnkey(
42
- async (req) => {
+ async (req: NextRequestWithUnkeyContext) => {
43
// Process the request here
44
// You have access to the verification response using `req.unkey`
45
console.log(req.unkey);
@@ -48,6 +48,7 @@ export const POST = withUnkey(
48
},
49
{ rootKey: process.env.UNKEY_ROOT_KEY! }
50
);
51
+);
52
```
53
54
If you want to customize how `withUnkey` processes incoming requests, you can do so as follows:
0 commit comments