Increase the expiry time of the login email

For test purposes only, how can I increase the email duration to log in?

I need to create a link with no expiration or with a very long time.

After the end of the test, restore the original condition.

Can this be done in any way?

Hi @giacomosilli,

expiry of the links can be changed, not recommended though.

Open index.js and search for arguments expiresIn: '10m' (10m stands for 10 minutes)
Formats:
1h=1Hours
1d=1Day
1y=1Year

Expiration is mentioned 4 times in the file, so you have to change all 4.

path: /var/www/ghost/versions/3.13.1/node_modules/@tryghost/magic-link/index.js

restart ghost

Thanks, that’s exactly what I was looking for.

Can you say why it’s not recommended to change the expiry period of login links…especially if it’s just a blog, and I only collect email addresses…even if the user is careless about giving others access to their email accounts…all they could stand to be revealed is their email address…I find this sort of login security to be excessive