title: Error: secretOrPrivateKey must have a value
body: <p>I am using jwt to create token, but when i login via postman I get the error "Error: secretOrPrivateKey must have a value" from my console. I have attached my login code. Please anyone who can help me</p>
  
  <pre><code>exports.login = (req, res, next) =&gt; {
    User.findOne({
      where: {
        email: req.body.email
      }
    })
      .then(user =&gt; {
        if (!user) {
          return res.status(401).json({
            message:
              "Auth failed!! either the account does't exist or you entered a wrong account"
          });
        }
        bcrypt.compare(req.body.password, user.password, (err, result) =&gt; {
          if (err) {
            return res.status(401).json({
              message: "Auth failed",
              token: token
            });
          }
          if (result) {
            const token = jwt.sign(
              {
                email: user.email,
                password: user.id
              },
              process.env.JWT_KEY,
              {
                expiresIn: "1h"
              }
            );
  
            res.status(200).json({
              message: "Auth granted, welcome!",
              token: token
            });
          }
        });
      })
      .catch(err =&gt; {
        console.log(err);
        res.status(500).json({
          error: err
        });
      });
  };
  </code></pre>
  
  <p>this is my env.json file</p>
  
  <pre><code>{
      "env":{
          "MYSQL":"jllgshllWEUJHGHYJkjsfjds90",
          "JWT_KEY": "secret"
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/07PEb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/07PEb.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/PvCAr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PvCAr.png" alt="enter image description here"></a></p>