You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of client.ts uses cookies as synchronous functions, which is incompatible with Next.js 15 and later. In Next.js 15, the cookies object provides asynchronous methods for accessing and manipulating cookies.
Expected behavior
The client.ts code should be updated to use the asynchronous cookie methods introduced in Next.js 15. This will ensure compatibility with the latest versions of Next.js and prevent errors when accessing or manipulating cookies.
How to reproduce?
Use Logto JS SDK in a Next.js 15 project.
Attempt to access or manipulate cookies using the logto client.
Observe errors related to cookies being accessed synchronously.
Describe the bug
The current implementation of
client.ts
uses cookies as synchronous functions, which is incompatible with Next.js 15 and later. In Next.js 15, thecookies
object provides asynchronous methods for accessing and manipulating cookies.Expected behavior
The
client.ts
code should be updated to use the asynchronous cookie methods introduced in Next.js 15. This will ensure compatibility with the latest versions of Next.js and prevent errors when accessing or manipulating cookies.How to reproduce?
logto
client.Context
Additional context
I believe the following code snippet from packages/next/server-actions/client.ts needs to be updated:
Next.js 15 cookies API reference: https://nextjs.org/docs/app/api-reference/functions/cookies
The text was updated successfully, but these errors were encountered: