Closed volkgames closed 2 months ago
I have the same issue, the way I fixed was by making a client component for just the LoginLink
and RegisterLink
, it seems like they break when you use directly in server side. The other solution is to use a regular Next.js Link to api/auth/login
.
For the LoginLink
and RegisterLink
components, it's best to import them from @kinde-oss/kinde-auth-nextjs/components
to avoid this error. We left them in @kinde-oss/kinde-auth-nextjs
and @kinde-oss/kinde-auth-nextjs/server
for backwards compatibility.
@kinde-oss/kinde-auth-nextjs
you will need to be in a client component@kinde-oss/kinde-auth-nextjs/server
you will need to be in a server component@kinde-oss/kinde-auth-nextjs/components
can be done in both client and server
Prerequisites
Describe the issue
Hi, I just tried to get server session for isAuthenticated method for switch for two buttons display but this happen only here
console:
Library URL
https://github.com/kinde-oss/kinde-auth-nextjs
Library version
2.2.6
Operating system(s)
Windows
Operating system version(s)
Windows 11 version 22H2
Further environment details
package.json
Reproducible test case URL
No response
Additional information
No response