New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@frontegg/client

Package Overview
Dependencies
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontegg/client - npm Package Compare versions

Comparing version 1.0.30 to 1.0.31-0

4

dist/index.d.ts
import { AuditsClient } from './src/audits';
import { frontegg } from './src/middleware';
import { frontegg, IFronteggOptions } from './src/middleware';
import { FronteggPermissions } from './src/permissions';
export { AuditsClient, frontegg, FronteggPermissions, };
export { AuditsClient, frontegg, FronteggPermissions, IFronteggOptions, };

@@ -7,7 +7,8 @@ import { FronteggPermissions } from '../permissions';

}>;
export declare function frontegg(options: {
export interface IFronteggOptions {
clientId: string;
apiKey: string;
contextResolver: fronteggContextResolver;
}): (req: any, res: any) => Promise<void>;
}
export declare function frontegg(options: IFronteggOptions): (req: any, res: any) => Promise<void>;
export {};

@@ -144,3 +144,3 @@ "use strict";

var _this = this;
logger_1.default.log('you got to my frontegg middleware');
logger_1.default.debug('you got to my frontegg middleware');
if (!options) {

@@ -184,2 +184,4 @@ throw new Error('Missing options');

case 0:
logger_1.default.debug("proxyReq - returned for " + req.originalUrl);
enableCors(req, proxyRes);
if (!(proxyRes.statusCode === 401)) return [3 /*break*/, 3];

@@ -202,2 +204,17 @@ req.frontegg.retryCount = req.frontegg.retryCount + 1;

}); });
function enableCors(req, res) {
if (req.headers['access-control-request-method']) {
logger_1.default.debug("enableCors - going to set access-control-request-method");
res.headers["access-control-allow-methods"] = req.headers['access-control-request-method'];
}
if (req.headers['access-control-request-headers']) {
logger_1.default.debug("enableCors - going to set access-control-request-headers");
res.headers['access-control-allow-headers'] = req.headers['access-control-request-headers'];
}
if (req.headers.origin) {
logger_1.default.debug("enableCors - going to set access-control-allow-origin to " + req.headers.origin);
res.headers['access-control-allow-origin'] = req.headers.origin;
res.headers['access-control-allow-credentials'] = 'true';
}
}
proxy.on('proxyReq', function (proxyReq, req, res, _) {

@@ -204,0 +221,0 @@ if (req.body) {

import { AuditsClient } from './src/audits';
import { frontegg } from './src/middleware';
import { frontegg, IFronteggOptions } from './src/middleware';
import { FronteggPermissions } from './src/permissions';

@@ -9,2 +9,3 @@

FronteggPermissions,
IFronteggOptions,
};
{
"name": "@frontegg/client",
"version": "1.0.30",
"version": "1.0.31-0",
"description": "Frontegg Javascript Library for backend",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc