Trying simpler setup
This commit is contained in:
parent
80ab17eb05
commit
4f99bc6027
@ -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
|
||||||
|
20
src/auth.ts
20
src/auth.ts
@ -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
|
||||||
|
//})
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user