From 75c4e28efa56a7b863ca3181a952ebead65ba637 Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Mon, 7 Oct 2024 13:35:58 +0530 Subject: [PATCH] Adds migration guide for using updated next.js handler function --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 359c6a2b3..fe275c657 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -141,6 +141,25 @@ SuperTokens.init({ }); ``` +#### Using updated `getAppDirRequestHandler` for next.js + +Before: + +```ts +import { getAppDirRequestHandler } from "supertokens-node/nextjs"; +import { NextResponse } from "next/server"; + +const handleCall = getAppDirRequestHandler(NextResponse); +``` + +After: + +```ts +import { getAppDirRequestHandler } from "supertokens-node/nextjs"; + +const handleCall = getAppDirRequestHandler(); +``` + ## [20.1.3] - 2024-09-30 - Replaces `psl` with `tldts` to avoid `punycode` deprecation warning.