fix: build errors and simplify auth

This commit is contained in:
Manohar Gupta 2026-05-10 04:14:23 +05:30
parent 6b068e37f8
commit 68b571d321
5 changed files with 15 additions and 23 deletions

2
next-env.d.ts vendored
View file

@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

10
package-lock.json generated
View file

@ -17,6 +17,7 @@
"nanoid": "^5.1.11",
"next": "16.2.6",
"next-auth": "5.0.0-beta.31",
"nodemailer": "^7.0.13",
"openai": "^6.37.0",
"postgres": "^3.4.9",
"react": "19.2.4",
@ -4391,6 +4392,15 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/nodemailer": {
"version": "7.0.13",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.13.tgz",
"integrity": "sha512-PNDFSJdP+KFgdsG3ZzMXCgquO7I6McjY2vlqILjtJd0hy8wEvtugS9xKRF2NWlPNGxvLCXlTNIae4serI7dinw==",
"license": "MIT-0",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/oauth4webapi": {
"version": "3.8.6",
"resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.8.6.tgz",

View file

@ -17,6 +17,7 @@
"nanoid": "^5.1.11",
"next": "16.2.6",
"next-auth": "5.0.0-beta.31",
"nodemailer": "^7.0.13",
"openai": "^6.37.0",
"postgres": "^3.4.9",
"react": "19.2.4",

View file

@ -1,29 +1,11 @@
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";
import { users } from "@/db/schema/auth";
export const { handlers, auth, signIn, signOut } = NextAuth({
adapter: DrizzleAdapter(db, {
accountsTable: accounts,
sessionsTable: sessions,
usersTable: users,
verificationTokensTable: verificationTokens,
}),
providers: [
Email({
server: {
host: "smtp.resend.com",
port: 587,
auth: {
user: "resend",
pass: process.env.RESEND_API_KEY,
},
},
from: "Tia <tia@manohargupta.com>",
}),
],
adapter: DrizzleAdapter(db),
providers: [],
pages: {
signIn: "/login",
},

View file

@ -1,4 +1,3 @@
import { encodeBase64 } from "crypto";
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import * as schema from "./schema";