K
Kinde10mo ago
Falah

No user found

[Nextjs] : No user found when i try opening the web page again , some fetch() error in the console. Get normal when i clear the cookies adding more info. kindly comment if it's understoond, Thanks
1 Reply
onderay
onderay10mo ago
Are you using a custom domain? There are a few potential areas to investigate: Session Management: Ensure that your application correctly manages sessions. The getKindeServerSession helper function from the Kinde Next.js SDK should be used to manage user sessions effectively. This function helps in fetching the user's session data, which includes user details and authentication status. Make sure you're using this function correctly in your API routes or server-side logic to maintain the user's session. Cookie Handling: Issues with cookies can lead to problems with session persistence. The Kinde SDK manages cookies for authentication, but if there's a misconfiguration or an issue with the browser's handling of cookies, it could lead to the behavior you're experiencing. Review the SDK's cookie handling, especially looking into the recent updates or changes in the SDK that might affect cookie management, check that you are running the latest SDK. Error Handling in Fetch Requests: The fetch errors in the console might provide more insight into what's going wrong. Ensure that your application's fetch requests to Kinde's APIs or your backend are correctly handling errors. Mismanagement of fetch requests or not properly handling the responses can lead to issues in user state management.
Want results from more Discord servers?
Add your server