Type error: Route "src/app/api/auth/[kindeAuth]/route.ts" does not match the required types of a Next.js Route.
Invalid configuration "GET":
Expected "Function | undefined", got "Promise<void | Response> | ((req: NextApiRequest | Request, res: Response | NextApiResponse) => Promise<...>)".
Linting and checking validity of types ...error: script "build" exited with code 1 (SIGHUP)
This was already mentioned in support (1174134934265397289) but I think it deserves a bug report thread.
import {handleAuth} from "@kinde-oss/kinde-auth-nextjs/server";
export const GET = handleAuth();
This code causes the error when you try to build a typescript next.js app.
The reason is that the default export in handlers/auth.js can return a promise for backwards compatibility, but won't ever return a promise when called with no params like we are here.
Hi @saM69420, We have released a new version of the NextJS v2.0.9: https://www.npmjs.com/package/@kinde-oss/kinde-auth-nextjs Are you able to update to the this latest version and see if your issue still exists (without the temporary solution)?