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 {
|
||||
providers: [Apple],
|
||||
} satisfies NextAuthConfig
|
||||
//export default {
|
||||
//providers: [Apple],
|
||||
//} satisfies NextAuthConfig
|
||||
|
20
src/auth.ts
20
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
|
||||
//})
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user