diff --git a/src/auth.config.ts b/src/auth.config.ts index b243cdb..7eda43d 100644 --- a/src/auth.config.ts +++ b/src/auth.config.ts @@ -1,7 +1,7 @@ -import Apple from "next-auth/providers/apple" +//import Apple from "next-auth/providers/apple" -import type { NextAuthConfig } from "next-auth" +//import type { NextAuthConfig } from "next-auth" -export default { - providers: [Apple], -} satisfies NextAuthConfig +//export default { + //providers: [Apple], +//} satisfies NextAuthConfig diff --git a/src/auth.ts b/src/auth.ts index a6216d8..f55d0f4 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -1,10 +1,16 @@ import NextAuth from "next-auth" -import { DrizzleAdapter } from "@auth/drizzle-adapter" -import { db } from "~/server/db/schema" -import authConfig from "~/auth.config" +import Apple from "next-auth/providers/apple" -export const { handlers, signIn, signOut, auth } = NextAuth({ - adapter: DrizzleAdapter(db), - //session: { strategy: "jwt" }, - ...authConfig +export const { handlers, auth, signIn, signOut } = NextAuth({ + providers: [Apple], }) +//import NextAuth from "next-auth" +//import { DrizzleAdapter } from "@auth/drizzle-adapter" +//import { db } from "~/server/db/schema" +//import authConfig from "~/auth.config" + +//export const { handlers, signIn, signOut, auth } = NextAuth({ + //adapter: DrizzleAdapter(db), + //session: { strategy: "jwt" }, + //...authConfig +//}) diff --git a/src/middleware.ts b/src/middleware.ts index 0a1cc4e..8f0c534 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,3 +1,4 @@ -import authConfig from "~/auth.config" -import NextAuth from "next-auth" -export const { auth: middleware } = NextAuth(authConfig) +export { auth as middleware } from "~/auth" +//import authConfig from "~/auth.config" +//import NextAuth from "next-auth" +//export const { auth: middleware } = NextAuth(authConfig)