-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
Problem
I'm having issues extending the types for user sessions in nuxt-auth-utils. Despite following TypeScript module declaration best practices, the custom types are not being recognized when using setUserSession.
Environment
- Nuxt version: 3.17.4
- nuxt-auth-utils version: 0.5.20
- TypeScript version: 5.8.3
- Project structure: Monorepo (using Moon), but the Nuxt app functions independently
The issue
When calling setUserSession(event, { ... }), TypeScript doesn't recognize my custom type definitions from my auth.d.ts file
What I've tried
- Created a auth.d.ts file
- Tried adding explicit configuration for nuxt.config.ts
export default defineNuxtConfig({
typescript: {
shim: false,
typeCheck: true,
tsConfig: {
include: ['types/**/*.d.ts']
}
}
// rest of configuration
})
Workarounds tried
As a temporary workaround, I've had to use:
Metadata
Metadata
Assignees
Labels
No labels