Skip to content

Commit 29dd4da

Browse files
authored
docs: fix missing auth.d.ts session types in server dir Nuxt 4 (#437)
1 parent f7127f5 commit 29dd4da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ const session = await requireUserSession(event)
156156

157157
You can define the type for your user session by creating a type declaration file (for example, `auth.d.ts`) in your project to augment the `UserSession` type:
158158

159+
> [!NOTE]
160+
> If you are using Nuxt >=4.0.0 or compatibility version 4 add the `auth.d.ts` file to the `shared` directory to get the correct types in server and client.
161+
159162
```ts
160163
// auth.d.ts
161164
declare module '#auth-utils' {

0 commit comments

Comments
 (0)