-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
questionAsk how to do something or how something worksAsk how to do something or how something works
Description
Question 💬
Hey Folks
I'm using NextAuth and it's Email Provider for authentication. Everything is great except for one issue.
Our email link expires after 24 hours. The info on the next auth docs is that we should overwrite the maxage parameter in the provider. I have set it to 365 days however it is still expiring after 24 hours.
Following is my email provider code(Happy to provide more code if you want):
EmailProvider({
server: {
host: process.env.EMAIL_SERVER_HOST,
port: process.env.EMAIL_SERVER_PORT,
auth: {
user: process.env.EMAIL_SERVER_USER,
pass: process.env.EMAIL_SERVER_PASSWORD,
},
},
maxAge: 365 * 24 * 60 * 60,
from: process.env.EMAIL_FROM,
sendVerificationRequest({ identifier, url, provider }) {
CustomsendVerificationRequest({ identifier, url, provider })
},
})
This is a problem we're facing since most of our customers don't login until 2-3 days later.
How do we extend the email link expiration?
Any kind of help would be greatly appreciated
Thanks
How to reproduce ☕️
Setup a next auth project
Setup Email provider
Setup CustomsendVerificationRequest
Set Maxage to whatever you want in Email
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Metadata
Metadata
Assignees
Labels
questionAsk how to do something or how something worksAsk how to do something or how something works