KindeK
Kinde3y ago
20 replies
Rep.

Clicking login takes me to API route and not login page (Next 14)

Trying to get up and running with Next14 and App Router.

I've got env setup and the following in src/app/api/auth/[kindeauth]/route.ts

import { handleAuth } from "@kinde-oss/kinde-auth-nextjs/server";
import { type NextApiRequest } from "next";

export async function GET(
  request: NextApiRequest,
  { params }: { params: { kindeAuth: string } },
) {
  const endpoint = params.kindeAuth;
  return handleAuth(request, endpoint);
}


When I click my login component it navigates to http://localhost:3000/api/auth/login any ideas?
Was this page helpful?