@konplit-services/common 1.10.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -239,6 +239,8 @@ declare class AppConfigs {
239
239
  constructor(processEnv: typeof env);
240
240
  getAppName(): string;
241
241
  getJWTKEY(): string;
242
+ get2FaJWTKEY(): string;
243
+ get2FaAccessTime(): string;
242
244
  getTransactionJWTKEY(): string;
243
245
  getDBURI(): string;
244
246
  getActivityLogDBURI(): string;
@@ -17,6 +17,18 @@ class AppConfigs {
17
17
  }
18
18
  return this.env.JWT_KEY;
19
19
  }
20
+ get2FaJWTKEY() {
21
+ if (!this.env.TWOFA_JWT_KEY) {
22
+ throw new Error("TWOFA_JWT_KEY is required");
23
+ }
24
+ return this.env.TWOFA_JWT_KEY;
25
+ }
26
+ get2FaAccessTime() {
27
+ if (!this.env.ACCESS_2FA_TOKEN_IN) {
28
+ throw new Error("ACCESS_2FA_TOKEN_IN is required");
29
+ }
30
+ return this.env.ACCESS_2FA_TOKEN_IN;
31
+ }
20
32
  getTransactionJWTKEY() {
21
33
  if (!this.env.TRANSACTION_JWT_KEY) {
22
34
  throw new Error("TRANSACTION_JWT_KEY is required");
@@ -24,7 +24,7 @@ var JWTType;
24
24
  const secret = process.env.JWT_KEY;
25
25
  const transactionSecret = process.env.TRANSACTION_JWT_KEY;
26
26
  const subscriptionSecret = process.env.SUBSCRIPTION_JWT_KEY;
27
- const twoFactorSecret = process.env.SUBSCRIPTION_JWT_KEY;
27
+ const twoFactorSecret = process.env.TWOFA_JWT_KEY;
28
28
  class JWT {
29
29
  static getToken(data_1) {
30
30
  return __awaiter(this, arguments, void 0, function* (data, options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",