From 7a66679fe65870a59ce77d0c4e8dd985ddedfec6 Mon Sep 17 00:00:00 2001 From: Misha Kaletsky <15040698+mmkal@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:49:17 -0400 Subject: [PATCH 1/3] docs: highlight archiving of next-auth/react-query project is read-only and author said users should just copy-paste the implementation: https://github.com/nextauthjs/react-query/issues/7#issuecomment-923099050 --- docs/docs/getting-started/client.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/docs/getting-started/client.md b/docs/docs/getting-started/client.md index 23bbc7c721..eb647f601a 100644 --- a/docs/docs/getting-started/client.md +++ b/docs/docs/getting-started/client.md @@ -150,11 +150,7 @@ More information can be found in the following [GitHub Issue](https://github.com ### NextAuth.js + React-Query -There is also an alternative client-side API library based upon [`react-query`](https://www.npmjs.com/package/react-query) available under [`nextauthjs/react-query`](https://github.com/nextauthjs/react-query). - -If you use `react-query` in your project already, you can leverage it with NextAuth.js to handle the client-side session management for you as well. This replaces NextAuth.js's native `useSession` and `SessionProvider` from `next-auth/react`. - -See repository [`README`](https://github.com/nextauthjs/react-query) for more details. +There was once an alternative client-side API library based upon [`react-query`](https://www.npmjs.com/package/react-query) available under [`nextauthjs/react-query`](https://github.com/nextauthjs/react-query). This project has been archived, but if use `react-query` in your project already, you can leverage it with NextAuth.js to handle the client-side session management for you as well. You can use the [original implementation from the `@next-auth/react-query` repo](https://github.com/nextauthjs/react-query/blob/4b985a79df43dc2be72da320677d6db068104aa1/package.json). --- @@ -531,4 +527,4 @@ export default function App({ ) } -``` \ No newline at end of file +``` From b5eb4dfe5c96320f786d889df94813c446a14515 Mon Sep 17 00:00:00 2001 From: Misha Kaletsky <15040698+mmkal@users.noreply.github.com> Date: Wed, 20 Jul 2022 08:14:47 -0400 Subject: [PATCH 2/3] Update docs/docs/getting-started/client.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Balázs Orbán --- docs/docs/getting-started/client.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/getting-started/client.md b/docs/docs/getting-started/client.md index eb647f601a..50e9a35a48 100644 --- a/docs/docs/getting-started/client.md +++ b/docs/docs/getting-started/client.md @@ -150,7 +150,7 @@ More information can be found in the following [GitHub Issue](https://github.com ### NextAuth.js + React-Query -There was once an alternative client-side API library based upon [`react-query`](https://www.npmjs.com/package/react-query) available under [`nextauthjs/react-query`](https://github.com/nextauthjs/react-query). This project has been archived, but if use `react-query` in your project already, you can leverage it with NextAuth.js to handle the client-side session management for you as well. You can use the [original implementation from the `@next-auth/react-query` repo](https://github.com/nextauthjs/react-query/blob/4b985a79df43dc2be72da320677d6db068104aa1/package.json). +You can create your own session management solution using data fetching libraries like [React Query](https://tanstack.com/query/v4/docs/adapters/react-query) or [SWR](https://swr.vercel.app). You can use the [original implementation of `@next-auth/react-query`](https://github.com/nextauthjs/react-query) and look at the [`next-auth/react` source code](https://github.com/nextauthjs/next-auth/blob/main/packages/next-auth/src/react/index.tsx) as a starting point. --- From ee23a6b171c65b775f390f5b62bad8ea35e00e72 Mon Sep 17 00:00:00 2001 From: Misha Kaletsky <15040698+mmkal@users.noreply.github.com> Date: Wed, 20 Jul 2022 08:14:54 -0400 Subject: [PATCH 3/3] Update docs/docs/getting-started/client.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Balázs Orbán --- docs/docs/getting-started/client.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/getting-started/client.md b/docs/docs/getting-started/client.md index 50e9a35a48..6ede0b9c2f 100644 --- a/docs/docs/getting-started/client.md +++ b/docs/docs/getting-started/client.md @@ -148,7 +148,7 @@ Because of how `_app` is written, it won't unnecessarily contact the `/api/auth/ More information can be found in the following [GitHub Issue](https://github.com/nextauthjs/next-auth/issues/1210). -### NextAuth.js + React-Query +### NextAuth.js + React Query You can create your own session management solution using data fetching libraries like [React Query](https://tanstack.com/query/v4/docs/adapters/react-query) or [SWR](https://swr.vercel.app). You can use the [original implementation of `@next-auth/react-query`](https://github.com/nextauthjs/react-query) and look at the [`next-auth/react` source code](https://github.com/nextauthjs/next-auth/blob/main/packages/next-auth/src/react/index.tsx) as a starting point.