private async makeToken()

in src/controller/credentialController.ts [114:126]


  private async makeToken() {
    const { apiKey, secret } = await this.getCredsFromStorage();

    const issuedAt = Math.floor(Date.now() / 1000);
    const payload = {
      iss: apiKey,
      jti: Math.random().toString(),
      iat: issuedAt,
      exp: issuedAt + 60,
    };

    return jwt.sign(payload, secret, { algorithm: "HS256" });
  }