Hello team, we have a problem with the migration to the new package version, we are currently using "@kinde-oss/kinde-auth-nextjs": "^1.8.24",
and we are trying to migrate to "@kinde-oss/kinde-auth-nextjs": "^2.4.6" . We use Next.js 14v with page router. We did the migration based on https://docs.kinde.com/developer-tools/sdks/backend/nextjs-prev-sdk/. But we constantly get error 500 related to the session as in the picture below.
Hey @Drago Vrban ,
I am going to get our NextJS team to also look at this.
If you are continuing using Pages Router, here are the key migration changes from v1 to v2:
• The handleAuth
import has changed:
import {handleAuth} from "@kinde-oss/kinde-auth-nextjs/server";
getKindeServerSession
now return promises:const {getUser} = getKindeServerSession(); const user = await getUser();
getKindeServerSession
are properly awaited.Hey Andre, We do not use this function(getKindeServerSession()) anywhere within the project, maybe the issue is related to this issue that was reported, that's almost the same.
https://github.com/kinde-oss/kinde-auth-nextjs/issues/204