another hope?

This commit is contained in:
wass08
2026-02-11 17:44:51 +09:00
parent 7682018c4b
commit addcdd76e0
+1 -9
View File
@@ -7,19 +7,11 @@ import { BASE_URL } from './utils'
const resendApiKey = process.env.RESEND_API_KEY
const resend = resendApiKey && resendApiKey.trim() !== '' ? new Resend(resendApiKey) : null
// Better Auth secret is required
const betterAuthSecret = process.env.BETTER_AUTH_SECRET
if (!betterAuthSecret) {
throw new Error(
'Missing BETTER_AUTH_SECRET environment variable. Generate one with: openssl rand -base64 32',
)
}
export const auth = createAuth({
db,
appName: 'Pascal Editor',
baseURL: BASE_URL,
secret: betterAuthSecret,
secret: process.env.BETTER_AUTH_SECRET!,
sendMagicLink: async ({ email, url }) => {
if (!resend) {
console.log(`[DEV] Magic link for ${email}: ${url}`)