Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auth0

Package Overview
Dependencies
Maintainers
47
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0 - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

1

dist/cjs/management/management-client-options.d.ts

@@ -16,3 +16,4 @@ import { ClientOptions } from '../lib/runtime.js';

clientAssertionSigningKey: string;
clientAssertionSigningAlg?: string;
}
export type ManagementClientOptionsWithClientCredentials = ManagementClientOptionsWithClientSecret | ManagementClientOptionsWithClientAssertion;

3

dist/cjs/management/token-provider-middleware.js

@@ -15,4 +15,3 @@ "use strict";

this.tokenProvider = new token_provider_js_1.TokenProvider({
clientId: options.clientId,
domain: options.domain,
...options,
audience: (_a = options.audience) !== null && _a !== void 0 ? _a : `https://${options.domain}/api/v2/`,

@@ -19,0 +18,0 @@ ...{ clientSecret: options.clientSecret },

@@ -1,7 +0,2 @@

interface BaseOptions {
domain: string;
audience: string;
clientId: string;
enableCache?: boolean;
}
import { ManagementClientOptionsWithClientAssertion, ManagementClientOptionsWithClientSecret } from './management-client-options.js';
export declare class TokenProvider {

@@ -13,10 +8,9 @@ private options;

private pending;
constructor(options: BaseOptions & {
clientSecret: string;
constructor(options: ManagementClientOptionsWithClientSecret & {
audience: string;
});
constructor(options: BaseOptions & {
clientAssertionSigningKey: string;
constructor(options: ManagementClientOptionsWithClientAssertion & {
audience: string;
});
getAccessToken(): Promise<string>;
}
export {};

@@ -11,14 +11,8 @@ "use strict";

this.accessToken = '';
this.authenticationClient = new index_js_1.AuthenticationClient({
clientId: options.clientId,
domain: options.domain,
clientSecret: options.clientSecret,
clientAssertionSigningKey: options.clientAssertionSigningKey,
});
this.authenticationClient = new index_js_1.AuthenticationClient(options);
}
async getAccessToken() {
const disableCache = this.options.enableCache === false;
if (disableCache || !this.accessToken || Date.now() > this.expiresAt - LEEWAY) {
if (!this.accessToken || Date.now() > this.expiresAt - LEEWAY) {
this.pending =
(!disableCache && this.pending) ||
this.pending ||
this.authenticationClient.oauth.clientCredentialsGrant({

@@ -25,0 +19,0 @@ audience: this.options.audience,

@@ -1,1 +0,1 @@

export declare const version = "4.0.0";
export declare const version = "4.0.1";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = '4.0.0';
exports.version = '4.0.1';
//# sourceMappingURL=version.js.map

@@ -16,3 +16,4 @@ import { ClientOptions } from '../lib/runtime.js';

clientAssertionSigningKey: string;
clientAssertionSigningAlg?: string;
}
export type ManagementClientOptionsWithClientCredentials = ManagementClientOptionsWithClientSecret | ManagementClientOptionsWithClientAssertion;

@@ -12,4 +12,3 @@ import { TokenProvider } from './token-provider.js';

this.tokenProvider = new TokenProvider({
clientId: options.clientId,
domain: options.domain,
...options,
audience: (_a = options.audience) !== null && _a !== void 0 ? _a : `https://${options.domain}/api/v2/`,

@@ -16,0 +15,0 @@ ...{ clientSecret: options.clientSecret },

@@ -1,7 +0,2 @@

interface BaseOptions {
domain: string;
audience: string;
clientId: string;
enableCache?: boolean;
}
import { ManagementClientOptionsWithClientAssertion, ManagementClientOptionsWithClientSecret } from './management-client-options.js';
export declare class TokenProvider {

@@ -13,10 +8,9 @@ private options;

private pending;
constructor(options: BaseOptions & {
clientSecret: string;
constructor(options: ManagementClientOptionsWithClientSecret & {
audience: string;
});
constructor(options: BaseOptions & {
clientAssertionSigningKey: string;
constructor(options: ManagementClientOptionsWithClientAssertion & {
audience: string;
});
getAccessToken(): Promise<string>;
}
export {};

@@ -8,14 +8,8 @@ import { AuthenticationClient } from '../auth/index.js';

this.accessToken = '';
this.authenticationClient = new AuthenticationClient({
clientId: options.clientId,
domain: options.domain,
clientSecret: options.clientSecret,
clientAssertionSigningKey: options.clientAssertionSigningKey,
});
this.authenticationClient = new AuthenticationClient(options);
}
async getAccessToken() {
const disableCache = this.options.enableCache === false;
if (disableCache || !this.accessToken || Date.now() > this.expiresAt - LEEWAY) {
if (!this.accessToken || Date.now() > this.expiresAt - LEEWAY) {
this.pending =
(!disableCache && this.pending) ||
this.pending ||
this.authenticationClient.oauth.clientCredentialsGrant({

@@ -22,0 +16,0 @@ audience: this.options.audience,

@@ -1,1 +0,1 @@

export declare const version = "4.0.0";
export declare const version = "4.0.1";

@@ -1,2 +0,2 @@

export const version = '4.0.0';
export const version = '4.0.1';
//# sourceMappingURL=version.js.map
{
"name": "auth0",
"version": "4.0.0",
"version": "4.0.1",
"description": "SDK for Auth0 API v2",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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