You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use NextAuth together with Magic Links and Nodemailer for authentication on my website.
I created several users with different fictitious email addresses for testing.
During development, it would be bad if next-auth sends login emails to my users' email addresses, as they are just fictitious. Instead, I want next-auth to send all emails to my own email address so that I don't accidentally send test emails to other people's real email accounts.
I have already tried the following things:
const configuration: AuthOptions = {
providers: [
EmailProvider({
server: {
options: {
// this is what I tried
to: 'myaddress@gmail.com',
envelope: {
to: 'myaddress@gmail.com',
},
sendmail: true,
args: [ 'to_addr', 'myaddress@gmail.com' ],
},
host: process.env.EMAIL_SERVER_HOST,
port: parseInt(process.env.EMAIL_SERVER_PORT!),
auth: {
user: process.env.EMAIL_SERVER_USER,
pass: process.env.EMAIL_SERVER_PASSWORD,
},
},
from: process.env.EMAIL_FROM,
}),
],
// other configuration
}
But nothing seems to work. Does anyone have another idea?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I use NextAuth together with Magic Links and Nodemailer for authentication on my website.
I created several users with different fictitious email addresses for testing.
During development, it would be bad if next-auth sends login emails to my users' email addresses, as they are just fictitious. Instead, I want next-auth to send all emails to my own email address so that I don't accidentally send test emails to other people's real email accounts.
I have already tried the following things:
But nothing seems to work. Does anyone have another idea?
Beta Was this translation helpful? Give feedback.
All reactions