Trying simpler setup

This commit is contained in:
Gabriel Brown 2024-08-08 03:15:30 -05:00
parent 80ab17eb05
commit 4f99bc6027
3 changed files with 22 additions and 15 deletions

View File

@ -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 { //export default {
providers: [Apple], //providers: [Apple],
} satisfies NextAuthConfig //} satisfies NextAuthConfig

View File

@ -1,10 +1,16 @@
import NextAuth from "next-auth" import NextAuth from "next-auth"
import { DrizzleAdapter } from "@auth/drizzle-adapter" import Apple from "next-auth/providers/apple"
import { db } from "~/server/db/schema"
import authConfig from "~/auth.config"
export const { handlers, signIn, signOut, auth } = NextAuth({ export const { handlers, auth, signIn, signOut } = NextAuth({
adapter: DrizzleAdapter(db), providers: [Apple],
//session: { strategy: "jwt" },
...authConfig
}) })
//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
//})

View File

@ -1,3 +1,4 @@
import authConfig from "~/auth.config" export { auth as middleware } from "~/auth"
import NextAuth from "next-auth" //import authConfig from "~/auth.config"
export const { auth: middleware } = NextAuth(authConfig) //import NextAuth from "next-auth"
//export const { auth: middleware } = NextAuth(authConfig)