Extend Auth.js Types Globally #7

Closed
opened 2026-04-03 12:22:15 +02:00 by schreifuchs · 0 comments
Owner

Where: src/app.d.ts
Why: TypeScript doesn't inherently know session.user.id exists, leading to hacky workarounds.
Fix: Override @auth/sveltekit Session types in app.d.ts to include id and email strictly.

**Where:** `src/app.d.ts` **Why:** TypeScript doesn't inherently know `session.user.id` exists, leading to hacky workarounds. **Fix:** Override `@auth/sveltekit` Session types in `app.d.ts` to include `id` and `email` strictly.
schreifuchs added the ai-generated label 2026-04-03 12:26:22 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: schreifuchs/aktiteil#7