mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 12:27:44 +00:00
docs: Use await in the next/headers to prevent errors (#296)
This commit is contained in:
committed by
GitHub
parent
bc60020dab
commit
26b52dd38f
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user