From ddcfe7959b1d9f4c89a55ed8c489b4adb033ea99 Mon Sep 17 00:00:00 2001 From: mahady-manana Date: Sat, 9 Nov 2024 15:00:58 +0300 Subject: [PATCH 1/3] Expose NextAuthRequest type from root --- packages/next-auth/src/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/next-auth/src/index.ts b/packages/next-auth/src/index.ts index 37be71b531..84c98ce1a4 100644 --- a/packages/next-auth/src/index.ts +++ b/packages/next-auth/src/index.ts @@ -68,12 +68,12 @@ */ import { Auth, customFetch } from "@auth/core" +import { signIn, signOut, update } from "./lib/actions.js" import { reqWithEnvURL, setEnvDefaults } from "./lib/env.js" import { initAuth } from "./lib/index.js" -import { signIn, signOut, update } from "./lib/actions.js" -import type { Awaitable, Session } from "@auth/core/types" import type { BuiltInProviderType } from "@auth/core/providers" +import type { Awaitable, Session } from "@auth/core/types" import type { GetServerSidePropsContext, NextApiRequest, @@ -91,10 +91,10 @@ export { AuthError, CredentialsSignin } from "@auth/core/errors" export { customFetch } export type { - Session, Account, - Profile, DefaultSession, + Profile, + Session, User, } from "@auth/core/types" @@ -103,7 +103,7 @@ type AppRouteHandlers = Record< (req: NextRequest) => Promise > -export type { NextAuthConfig } +export type { NextAuthConfig, NextAuthRequest } /** * The result of invoking {@link NextAuth|NextAuth}, initialized with the {@link NextAuthConfig}. From d39e964c8ca28fee2b60733e02ad49ccbc2bc177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 6 Feb 2025 19:59:29 +0100 Subject: [PATCH 2/3] Update index.ts --- packages/next-auth/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next-auth/src/index.ts b/packages/next-auth/src/index.ts index 84c98ce1a4..e46feb84a6 100644 --- a/packages/next-auth/src/index.ts +++ b/packages/next-auth/src/index.ts @@ -68,12 +68,12 @@ */ import { Auth, customFetch } from "@auth/core" -import { signIn, signOut, update } from "./lib/actions.js" import { reqWithEnvURL, setEnvDefaults } from "./lib/env.js" import { initAuth } from "./lib/index.js" +import { signIn, signOut, update } from "./lib/actions.js" -import type { BuiltInProviderType } from "@auth/core/providers" import type { Awaitable, Session } from "@auth/core/types" +import type { BuiltInProviderType } from "@auth/core/providers" import type { GetServerSidePropsContext, NextApiRequest, From 08ae41a7debe0695dca2b2824734ef0c0b6c97bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 6 Feb 2025 20:01:01 +0100 Subject: [PATCH 3/3] Update index.ts --- packages/next-auth/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next-auth/src/index.ts b/packages/next-auth/src/index.ts index e46feb84a6..4b79ee38c2 100644 --- a/packages/next-auth/src/index.ts +++ b/packages/next-auth/src/index.ts @@ -91,10 +91,10 @@ export { AuthError, CredentialsSignin } from "@auth/core/errors" export { customFetch } export type { + Session, Account, - DefaultSession, Profile, - Session, + DefaultSession, User, } from "@auth/core/types"