docs: Use await in the next/headers to prevent errors (#296)

This commit is contained in:
Md Mazedul Islam Khan
2024-10-22 23:43:32 +02:00
committed by GitHub
parent bc60020dab
commit 26b52dd38f

View File

@@ -285,7 +285,7 @@ The server provides a `session` object that you can use to access the session da
import { headers } from "next/headers";
const session = await auth.api.getSession({
headers: headers() // you need to pass the headers object.
headers: await headers() // you need to pass the headers object.
})
```
</Tab>