I'm working on a site with Kinde authentication applied to the inner pages of the /experience route. While everything works as expected locally, the live site at
https://www.setoo.co/experience is showing a 500 error when accessing these inner pages.
Here’s the middleware code used to protect the inner pages:
import { withAuth } from "@kinde-oss/kinde-auth-nextjs/middleware";
export default withAuth({
loginPage: '/api/auth/login', // Redirect to login page if not authenticated
isReturnToCurrentPage: true,
});
export const config = {
matcher: ["/experience/:path*"], // Protect inner pages under /experience
};
I’m unsure why this error only occurs on the live site and would appreciate any guidance on resolving this issue.
I have attached a video of the issue for better understanding
https://jam.dev/c/3163f5e3-b557-406b-bcda-8ef770ff9d80