@frontegg/client
Advanced tools
Comparing version 1.0.22 to 1.0.23
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var baseUrl = process.env.FRONTEGG_API_URL || "https://api.frontegg.com/"; | ||
if (baseUrl.endsWith('/')) { | ||
baseUrl = baseUrl.slice(0, -1); | ||
} | ||
; | ||
var config; | ||
@@ -8,5 +13,5 @@ (function (config) { | ||
} | ||
urls.authenticationService = process.env.FRONTEGG_AUTHENTICATION_SERVICE_URL || 'https://api.frontegg.com/vendors/auth/token'; | ||
urls.auditsService = process.env.FRONTEGG_AUDITS_SERVICE_URL || 'https://api.frontegg.com/audits/'; | ||
urls.metadataService = process.env.FRONTEGG_METADATA_SERVICE_URL || 'https://api.frontegg.com/metadata/'; | ||
urls.authenticationService = process.env.FRONTEGG_AUTHENTICATION_SERVICE_URL || baseUrl + "/vendors/auth/token"; | ||
urls.auditsService = process.env.FRONTEGG_AUDITS_SERVICE_URL || baseUrl + "/audits/"; | ||
urls.metadataService = process.env.FRONTEGG_METADATA_SERVICE_URL || baseUrl + "/metadata/"; | ||
return urls; | ||
@@ -13,0 +18,0 @@ }()); |
@@ -41,3 +41,3 @@ "use strict"; | ||
var proxy = httpProxy.createProxyServer({ secure: false, changeOrigin: true }); | ||
var target = "https://api.frontegg.com/"; | ||
var target = process.env.FRONTEGG_API_URL || "https://api.frontegg.com/"; | ||
var authenticator = new authenticator_1.FronteggAuthenticator(); | ||
@@ -44,0 +44,0 @@ var MAX_RETRIES = 3; |
{ | ||
"name": "@frontegg/client", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"description": "Frontegg Javascript Library for backend", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -0,7 +1,12 @@ | ||
let baseUrl = process.env.FRONTEGG_API_URL || "https://api.frontegg.com/"; | ||
if (baseUrl.endsWith('/')) { | ||
baseUrl = baseUrl.slice(0, -1) | ||
}; | ||
export module config { | ||
export class urls { | ||
public static authenticationService = process.env.FRONTEGG_AUTHENTICATION_SERVICE_URL || 'https://api.frontegg.com/vendors/auth/token'; | ||
public static auditsService = process.env.FRONTEGG_AUDITS_SERVICE_URL || 'https://api.frontegg.com/audits/'; | ||
public static metadataService = process.env.FRONTEGG_METADATA_SERVICE_URL || 'https://api.frontegg.com/metadata/'; | ||
public static authenticationService = process.env.FRONTEGG_AUTHENTICATION_SERVICE_URL || `${baseUrl}/vendors/auth/token`; | ||
public static auditsService = process.env.FRONTEGG_AUDITS_SERVICE_URL || `${baseUrl}/audits/`; | ||
public static metadataService = process.env.FRONTEGG_METADATA_SERVICE_URL || `${baseUrl}/metadata/`; | ||
} | ||
} |
import { FronteggAuthenticator } from '../authenticator' | ||
import * as httpProxy from 'http-proxy'; | ||
const proxy = httpProxy.createProxyServer({ secure: false, changeOrigin: true }); | ||
const target = "https://api.frontegg.com/"; | ||
const target = process.env.FRONTEGG_API_URL || "https://api.frontegg.com/"; | ||
const authenticator = new FronteggAuthenticator(); | ||
@@ -6,0 +6,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
60548
1263
1