From e516a525bca6f319a2f003e9677624e968b277bf Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 1 Feb 2026 11:05:30 +0000 Subject: refactor: centralize auth imports through new client module (#2437) * refactor(web): centralize next-auth client-side utilities Create lib/auth/client.ts to re-export all next-auth/react APIs (useSession, signIn, signOut, SessionProvider) from a single location. This prepares for future auth provider replacement by isolating the next-auth dependency. https://claude.ai/code/session_01RLLL6SquzmegG6wKHdT3Fm * format --------- Co-authored-by: Claude --- apps/web/app/logout/page.tsx | 2 +- apps/web/app/reader/[bookmarkId]/page.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/web/app') diff --git a/apps/web/app/logout/page.tsx b/apps/web/app/logout/page.tsx index 91ad684d..1e43622e 100644 --- a/apps/web/app/logout/page.tsx +++ b/apps/web/app/logout/page.tsx @@ -2,7 +2,7 @@ import { useEffect } from "react"; import { useRouter } from "next/navigation"; -import { signOut } from "next-auth/react"; +import { signOut } from "@/lib/auth/client"; import { useSearchHistory } from "@karakeep/shared-react/hooks/search-history"; diff --git a/apps/web/app/reader/[bookmarkId]/page.tsx b/apps/web/app/reader/[bookmarkId]/page.tsx index 5e77279f..3eba7c7a 100644 --- a/apps/web/app/reader/[bookmarkId]/page.tsx +++ b/apps/web/app/reader/[bookmarkId]/page.tsx @@ -8,9 +8,9 @@ import ReaderView from "@/components/dashboard/preview/ReaderView"; import { Button } from "@/components/ui/button"; import { FullPageSpinner } from "@/components/ui/full-page-spinner"; import { Separator } from "@/components/ui/separator"; +import { useSession } from "@/lib/auth/client"; import { useReaderSettings } from "@/lib/readerSettings"; import { HighlighterIcon as Highlight, Printer, X } from "lucide-react"; -import { useSession } from "next-auth/react"; import { api } from "@karakeep/shared-react/trpc"; import { BookmarkTypes } from "@karakeep/shared/types/bookmarks"; -- cgit v1.2.3-70-g09d2