Restore EmailProvider server config required by NextAuth validation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,16 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
|
||||
providers: [
|
||||
// Email provider for magic links (used for first login and password reset)
|
||||
EmailProvider({
|
||||
// Server config required by NextAuth validation but not used —
|
||||
// sendVerificationRequest below fully overrides email sending via getTransporter()
|
||||
server: {
|
||||
host: process.env.SMTP_HOST || 'localhost',
|
||||
port: Number(process.env.SMTP_PORT || 587),
|
||||
auth: {
|
||||
user: process.env.SMTP_USER || '',
|
||||
pass: process.env.SMTP_PASS || '',
|
||||
},
|
||||
},
|
||||
from: process.env.EMAIL_FROM || 'MOPC Platform <noreply@monaco-opc.com>',
|
||||
maxAge: parseInt(process.env.MAGIC_LINK_EXPIRY || '900'), // 15 minutes
|
||||
sendVerificationRequest: async ({ identifier: email, url }) => {
|
||||
|
||||
Reference in New Issue
Block a user