Not working on Nextjs?

Hi Im trying to use auth0 in nextjs app. Docs seem pretty straight forward so I have:

import { UserProvider } from "@auth0/nextjs-auth0/client";
import Link from "next/link";
export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <UserProvider>
      <html lang='en'>
        <body className={inter.className}>
          <Link href='/api/auth/login'>LogiNN</Link>
          {children}
        </body>
      </html>
    </UserProvider>
  );
}

and on pages/api/auth/[…auth0].ts:

import { handleAuth } from "@auth0/nextjs-auth0";

export default handleAuth();

all set up on auth0 app console and also .env.local file but I’m getting a 404 upon clicking on Login and being sent to:
http://localhost:3000/api/auth/login