kinde-oss/kinde-auth-nextjs

Bug: (getKindeServerSession throws an error in generateStaticParams)

Closed this issue · 1 comments

Prerequisites

Describe the issue

When using the getUser function from getKindeServerSession to get the user id in generateStaticParams (Nextjs 14.0.2 App Router) inside nested page route (/posts/[slug]), it throws this error... (Error: Invariant: cookies() expects to have requestAsyncStorage, none available)

Library URL

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

Library version

1.8.25

Operating system(s)

Ubuntu

Operating system version(s)

22.04

Further environment details

Node v20
Firefox v118

Reproducible test case URL

No response

Additional information

Oh, its fixed in version 2