From 6b068e37f8333c8bfb8d716f4efde1a266d55791 Mon Sep 17 00:00:00 2001 From: Mannu Date: Sun, 10 May 2026 04:12:04 +0530 Subject: [PATCH] feat: configure email provider with Resend --- src/auth.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/auth.ts b/src/auth.ts index c6e53bd..6287e5d 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -2,6 +2,7 @@ import NextAuth from "next-auth"; import { DrizzleAdapter } from "@auth/drizzle-adapter"; import { db } from "@/db"; import { accounts, sessions, users, verificationTokens } from "@/db/schema/auth"; +import Email from "next-auth/providers/email"; export const { handlers, auth, signIn, signOut } = NextAuth({ adapter: DrizzleAdapter(db, { @@ -10,7 +11,19 @@ export const { handlers, auth, signIn, signOut } = NextAuth({ usersTable: users, verificationTokensTable: verificationTokens, }), - providers: [], + providers: [ + Email({ + server: { + host: "smtp.resend.com", + port: 587, + auth: { + user: "resend", + pass: process.env.RESEND_API_KEY, + }, + }, + from: "Tia ", + }), + ], pages: { signIn: "/login", },