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

View File

@ -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
//})

View File

@ -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)