diff options
| author | Fuwn <[email protected]> | 2026-02-03 21:07:28 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-03 21:07:28 -0800 |
| commit | e72b0cb261b5fc9c70a839882ea07160ef7ef424 (patch) | |
| tree | 0913ca6b24a078b91a64d15817d80d3cdaf56d32 /packages/web/src/server/auth/config.ts | |
| parent | feat(mcp): Wire to Supabase with project and search tools (diff) | |
| download | archived-imemio-e72b0cb261b5fc9c70a839882ea07160ef7ef424.tar.xz archived-imemio-e72b0cb261b5fc9c70a839882ea07160ef7ef424.zip | |
feat(web): Replace NextAuth with Supabase Auth
Diffstat (limited to 'packages/web/src/server/auth/config.ts')
| -rw-r--r-- | packages/web/src/server/auth/config.ts | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/packages/web/src/server/auth/config.ts b/packages/web/src/server/auth/config.ts deleted file mode 100644 index b3307cc..0000000 --- a/packages/web/src/server/auth/config.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { DrizzleAdapter } from "@auth/drizzle-adapter"; -import type { DefaultSession, NextAuthConfig } from "next-auth"; -import DiscordProvider from "next-auth/providers/discord"; -import { db } from "~/server/db"; -import { - accounts, - sessions, - users, - verificationTokens, -} from "~/server/db/schema"; - -/** - * Module augmentation for `next-auth` types. Allows us to add custom properties to the `session` - * object and keep type safety. - * - * @see https://next-auth.js.org/getting-started/typescript#module-augmentation - */ -declare module "next-auth" { - interface Session extends DefaultSession { - user: { - id: string; - // ...other properties - // role: UserRole; - } & DefaultSession["user"]; - } - - // interface User { - // // ...other properties - // // role: UserRole; - // } -} - -/** - * Options for NextAuth.js used to configure adapters, providers, callbacks, etc. - * - * @see https://next-auth.js.org/configuration/options - */ -export const authConfig = { - providers: [ - DiscordProvider, - /** - * ...add more providers here. - * - * Most other providers require a bit more work than the Discord provider. For example, the - * GitHub provider requires you to add the `refresh_token_expires_in` field to the Account - * model. Refer to the NextAuth.js docs for the provider you want to use. Example: - * - * @see https://next-auth.js.org/providers/github - */ - ], - adapter: DrizzleAdapter(db, { - usersTable: users, - accountsTable: accounts, - sessionsTable: sessions, - verificationTokensTable: verificationTokens, - }), - callbacks: { - session: ({ session, user }) => ({ - ...session, - user: { - ...session.user, - id: user.id, - }, - }), - }, -} satisfies NextAuthConfig; |