From 8bc933721e5d12ae6ed9e966529d92a6dc2e1563 Mon Sep 17 00:00:00 2001 From: Olabode Lawal-Shittabey Date: Thu, 23 Feb 2023 05:55:13 +0100 Subject: [PATCH] Added missing preposition Completed sentence with missing imperative preposition 'on'. I believe the sentence is states that `getServerSession` reduces response time when used over `getSession` on the server-side (API route or `getServerSideProps`), hence the correction. Thanks in anticipation of a merge. --- docs/docs/configuration/nextjs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/nextjs.md b/docs/docs/configuration/nextjs.md index d7e5559399..139d7795f1 100644 --- a/docs/docs/configuration/nextjs.md +++ b/docs/docs/configuration/nextjs.md @@ -6,7 +6,7 @@ This method was renamed to `getServerSession`. See the documentation below. ## `getServerSession` -When calling from server-side i.e. in API routes or in `getServerSideProps`, we recommend using this function instead of `getSession` to retrieve the `session` object. This method is especially useful when you are using NextAuth.js with a database. This method can _drastically_ reduce response time when used over `getSession` server-side, due to avoiding an extra `fetch` to an API Route (this is generally [not recommended in Next.js](https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props#getserversideprops-or-api-routes)). In addition, `getServerSession` will correctly update the cookie expiry time and update the session content if `callbacks.jwt` or `callbacks.session` changed something. +When calling from server-side i.e. in API routes or in `getServerSideProps`, we recommend using this function instead of `getSession` to retrieve the `session` object. This method is especially useful when you are using NextAuth.js with a database. This method can _drastically_ reduce response time when used over `getSession` on server-side, due to avoiding an extra `fetch` to an API Route (this is generally [not recommended in Next.js](https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props#getserversideprops-or-api-routes)). In addition, `getServerSession` will correctly update the cookie expiry time and update the session content if `callbacks.jwt` or `callbacks.session` changed something. Otherwise, if you only want to get the session token, see [`getToken`](/tutorials/securing-pages-and-api-routes#using-gettoken).