It's because you are using double quotations in your .env file; just remove them and use "process.env.JWT_SECRET" as usual. Another option is to have them and use ${process.env.JWT_SECRET_KEY}.