kinde-oss / kinde-auth-nextjs

Kinde NextJS SDK - authentication for server rendered apps
https://kinde.com/docs/developer-tools/nextjs-sdk/
MIT License
149 stars 20 forks source link

Bug: getting 500 from calling /api/auth/setup #214

Open QingjiaTsang opened 1 day ago

QingjiaTsang commented 1 day ago

Prerequisites

Describe the issue

I'm using Nextjs v14.2.11. When I haven't logged in, I get this error every time from methods called in getKindeServerSession, like getUser, isAuthenticated. What's worse, the error seems to make the web page break down on the mobile(iPhone13pro).

from the server side: image from the client side: image

on mobile: IMG_BA1BE7E654EE-1

image

Library URL

https://github.com/kinde-oss/kinde-auth-nextjs

Library version

2.3.8

Operating system(s)

macOS

Operating system version(s)

ventura 13.6.9

Further environment details

No response

Reproducible test case URL

No response

Additional information

No response

DanielRivers commented 10 hours ago

Hi @QingjiaTsang,

Thank you for raising, is this reproducible on our starter kit?

QingjiaTsang commented 10 hours ago

Hi @QingjiaTsang,

Thank you for raising, is this reproducible on our starter kit?

I'm using the following starter kit with kinde v2.3.8 and update the nextjs version to 14.2.11. It won't cause any error though. https://github.com/kinde-starter-kits/kinde-nextjs-app-router-starter-kit

but for now I don't know why it's throwing the error in my project

QingjiaTsang commented 9 hours ago

@DanielRivers I can share the codebase to you and please check it out.

https://github.com/QingjiaTsang/real-estate-app-nextjs14