Skip to content
masterclass Buddy

Auth.js · Type Alias

DefaultSession

Use TypeScript module augmentation to add custom fields to Auth.js shared types. Return those fields from the session callback if they should be available to the client.

Last updated

Syntax

declare module "next-auth" { interface Session { user: { customField: string } & DefaultSession["user"] } }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • DefaultSession
  • Session
  • User
  • NextAuthConfig
  • callbacks.session
  • JWT
  • DefaultUser

Source: Auth.js | Typescript. Checked 2026-11-03.