From 634d95a8fb3261fd8b0beba460ec5ee07af104f6 Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Fri, 18 Aug 2023 16:32:13 +0100 Subject: [PATCH] Build docs II --- docs/types/session_get_session.GetSession.html | 5 ++--- docs/types/session_touch_session.TouchSession.html | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/types/session_get_session.GetSession.html b/docs/types/session_get_session.GetSession.html index 07c0d64c5..756b8b237 100644 --- a/docs/types/session_get_session.GetSession.html +++ b/docs/types/session_get_session.GetSession.html @@ -34,8 +34,7 @@

Type declaration

Note: You can't write to the cookie in a React Server Component, so updates to the session like setting the expiry of the rolling session won't be persisted. -For this, we recommend touching the session in the middleware using getSession or -withMiddlewareAuthRequired.

+For this, we recommend interacting with the session in the middleware.

You can also get the session in a page or route in the Edge Runtime:

// app/my-api/route.js
import { getSession } from '@auth0/nextjs-auth0/edge'; // Note the /edge import

export default async function MyPage({ params, searchParams }) {
const { user } = await getSession();
return <h1>My Page</h1>;
}

export const runtime = 'edge';
@@ -59,7 +58,7 @@
Rest Returns Promise<default | null | undefined>
+
  • Defined in session/get-session.ts:115
  • +
  • Defined in session/touch-session.ts:116