Next.js Discord

Discord Forum

NextAuth Help

Unanswered
Max posted this in #help-forum
Open in Discord
MaxOP
auth.ts:
import NextAuth from "next-auth";
import prisma from "./lib/prisma";
import { PrismaAdapter } from "@auth/prisma-adapter";
import type { Adapter } from "next-auth/adapters";
import Google from "next-auth/providers/google";

export const { handlers, signIn, signOut, auth } = NextAuth({
    adapter: PrismaAdapter(prisma) as Adapter,
    providers: [Google] as any,
});


route.ts:
import { handlers } from "@/auth";

export const { GET, POST } = handlers;


Error:
https://i.imgur.com/B4zKemK.png

3 Replies

MaxOP
Can anyone help me?
Pls
MaxOP
????