From 1985b16824009e4a8d79f6bdb5b2d9491488fe95 Mon Sep 17 00:00:00 2001 From: Pablo Lara Date: Tue, 27 Aug 2024 17:05:09 +0200 Subject: [PATCH] feat: add nexthauth.d.ts to have the DefaultSession info available --- nextauth.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 nextauth.d.ts diff --git a/nextauth.d.ts b/nextauth.d.ts new file mode 100644 index 0000000000..052e4d4a7c --- /dev/null +++ b/nextauth.d.ts @@ -0,0 +1,14 @@ +import { DefaultSession } from "next-auth"; + +declare module "next-auth" { + interface Session { + user: { + id: string; + firstName: string; + companyName: string; + email: string; + role: string; + image?: string; + } & DefaultSession["user"]; + } +}