docs: imporve nextjs callout for getSessionCookie

This commit is contained in:
Bereket Engida
2025-05-22 11:34:54 -07:00
parent 460aabf5e0
commit 69ef90dfd7

View File

@@ -132,7 +132,7 @@ In Next.js middleware, it's recommended to only check for the existence of a ses
You can use the `getSessionCookie` helper from Better Auth for this purpose:
<Callout type="warn">
The <code>getSessionCookie()</code> function does not automatically reference the auth config specified in <code>auth.ts</code>. Therefore, you need to ensure that the configuration in <code>getSessionCookie()</code> matches the config defined in your <code>auth.ts</code>.
The <code>getSessionCookie()</code> function does not automatically reference the auth config specified in <code>auth.ts</code>. Therefore, if you customized the cookie name or prefix, you need to ensure that the configuration in <code>getSessionCookie()</code> matches the config defined in your <code>auth.ts</code>.
</Callout>
```ts