Socket
Socket
Sign inDemoInstall

@auth0/auth0-spa-js

Package Overview
Dependencies
Maintainers
48
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@auth0/auth0-spa-js - npm Package Compare versions

Comparing version 1.18.0 to 1.19.0

9

dist/typings/api.d.ts

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

import { TokenEndpointOptions } from './global';
export declare type TokenEndpointResponse = {
id_token: string;
access_token: string;
refresh_token?: string;
expires_in: number;
scope?: string;
};
import { TokenEndpointOptions, TokenEndpointResponse } from './global';
export declare function oauthToken({ baseUrl, timeout, audience, scope, auth0Client, useFormData, ...options }: TokenEndpointOptions, worker?: Worker): Promise<TokenEndpointResponse>;

35

dist/typings/Auth0Client.d.ts

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

import { Auth0ClientOptions, RedirectLoginOptions, PopupLoginOptions, PopupConfigOptions, GetUserOptions, GetIdTokenClaimsOptions, RedirectLoginResult, GetTokenSilentlyOptions, GetTokenWithPopupOptions, LogoutOptions, CacheLocation, LogoutUrlOptions, User, IdToken } from './global';
import { Auth0ClientOptions, RedirectLoginOptions, PopupLoginOptions, PopupConfigOptions, GetUserOptions, GetIdTokenClaimsOptions, RedirectLoginResult, GetTokenSilentlyOptions, GetTokenWithPopupOptions, LogoutOptions, CacheLocation, LogoutUrlOptions, User, IdToken, GetTokenSilentlyVerboseResponse } from './global';
/**

@@ -18,2 +18,3 @@ * Auth0 SDK for Single Page Applications using [Authorization Code Grant Flow with PKCE](https://auth0.com/docs/api-auth/tutorials/authorization-code-grant-pkce).

private isAuthenticatedCookieName;
private nowProvider;
cacheLocation: CacheLocation;

@@ -134,28 +135,15 @@ private worker;

/**
* ```js
* const token = await auth0.getTokenSilently(options);
* ```
* Fetches a new access token and returns the response from the /oauth/token endpoint, omitting the refresh token.
*
* If there's a valid token stored, return it. Otherwise, opens an
* iframe with the `/authorize` URL using the parameters provided
* as arguments. Random and secure `state` and `nonce` parameters
* will be auto-generated. If the response is successful, results
* will be valid according to their expiration times.
* @param options
*/
getTokenSilently(options: GetTokenSilentlyOptions & {
detailedResponse: true;
}): Promise<GetTokenSilentlyVerboseResponse>;
/**
* Fetches a new access token and returns it.
*
* If refresh tokens are used, the token endpoint is called directly with the
* 'refresh_token' grant. If no refresh token is available to make this call,
* the SDK falls back to using an iframe to the '/authorize' URL.
*
* This method may use a web worker to perform the token call if the in-memory
* cache is used.
*
* If an `audience` value is given to this function, the SDK always falls
* back to using an iframe to make the token exchange.
*
* Note that in all cases, falling back to an iframe requires access to
* the `auth0` cookie.
*
* @param options
*/
getTokenSilently(options?: GetTokenSilentlyOptions): Promise<any>;
getTokenSilently(options?: GetTokenSilentlyOptions): Promise<string>;
private _getTokenSilently;

@@ -215,2 +203,3 @@ /**

private _getTokenUsingRefreshToken;
private _getEntryFromCache;
}

@@ -6,3 +6,4 @@ import { CacheKeyManifest } from './key-manifest';

private keyManifest?;
constructor(cache: ICache, keyManifest?: CacheKeyManifest);
private nowProvider?;
constructor(cache: ICache, keyManifest?: CacheKeyManifest, nowProvider?: () => number | Promise<number>);
get(cacheKey: CacheKey, expiryAdjustmentSeconds?: number): Promise<Partial<CacheEntry> | undefined>;

@@ -9,0 +10,0 @@ set(entry: CacheEntry): Promise<void>;

@@ -45,2 +45,3 @@ import { IdToken, User } from '../global';

refresh_token?: string;
oauthTokenScope?: string;
};

@@ -47,0 +48,0 @@ export declare type WrappedCacheEntry = {

@@ -54,1 +54,2 @@ import { PopupConfigOptions } from './global';

};
export declare const DEFAULT_NOW_PROVIDER: () => number;
/**
* For context on the istanbul ignore statements below, see:
* https://github.com/gotwarlost/istanbul/issues/690
*/
/**
* Thrown when network requests to the Auth server fail.

@@ -3,0 +7,0 @@ */

@@ -192,2 +192,8 @@ import { ICache } from './cache';

useFormData?: boolean;
/**
* Modify the value used as the current time during the token validation.
*
* **Note**: Using this improperly can potentially compromise the token validation.
*/
nowProvider?: () => Promise<number> | number;
}

@@ -302,2 +308,9 @@ /**

/**
* If true, the full response from the /oauth/token endpoint (or the cache, if the cache was used) is returned
* (minus `refresh_token` if one was issued). Otherwise, just the access token is returned.
*
* The default is `false`.
*/
detailedResponse?: boolean;
/**
* If you need to send custom parameters to the Authorization Server,

@@ -309,2 +322,7 @@ * make sure to use the original parameter name.

export interface GetTokenWithPopupOptions extends PopupLoginOptions {
/**
* When `true`, ignores the cache and always sends a
* request to Auth0.
*/
ignoreCache?: boolean;
}

@@ -407,2 +425,12 @@ export interface LogoutUrlOptions {

*/
export declare type TokenEndpointResponse = {
id_token: string;
access_token: string;
refresh_token?: string;
expires_in: number;
scope?: string;
};
/**
* @ignore
*/
export interface OAuthTokenOptions extends TokenEndpointOptions {

@@ -432,2 +460,3 @@ code_verifier: string;

organizationId?: string;
now?: number;
}

@@ -510,2 +539,3 @@ /**

};
export declare type GetTokenSilentlyVerboseResponse = Omit<Partial<TokenEndpointResponse>, 'refresh_token'>;
export {};

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

declare const _default: "1.18.0";
declare const _default: "1.19.0";
export default _default;

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "1.18.0",
"version": "1.19.0",
"main": "dist/lib/auth0-spa-js.cjs.js",

@@ -39,27 +39,27 @@ "types": "dist/typings/index.d.ts",

"@types/cypress": "^1.1.3",
"@types/jest": "^26.0.24",
"@typescript-eslint/eslint-plugin-tslint": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"browserstack-cypress-cli": "^1.8.1",
"@types/jest": "^27.0.2",
"@typescript-eslint/eslint-plugin-tslint": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"browserstack-cypress-cli": "^1.10.1",
"cli-table": "^0.3.6",
"codecov": "^3.8.3",
"concurrently": "^5.3.0",
"concurrently": "^6.3.0",
"cypress": "7.2.0",
"es-check": "^5.2.4",
"eslint": "^7.31.0",
"gzip-size": "^5.1.1",
"husky": "^4.3.8",
"idtoken-verifier": "^2.2.0",
"jest": "^26.6.3",
"jest-junit": "^12.2.0",
"jest-localstorage-mock": "^2.4.14",
"es-check": "^6.0.0",
"eslint": "^7.32.0",
"gzip-size": "^6.0.0",
"husky": "^7.0.2",
"idtoken-verifier": "^2.2.1",
"jest": "^27.2.4",
"jest-junit": "^13.0.0",
"jest-localstorage-mock": "^2.4.18",
"jsonwebtoken": "^8.5.1",
"oidc-provider": "^7.5.4",
"oidc-provider": "^7.8.0",
"pem": "^1.14.4",
"prettier": "^2.3.2",
"prettier": "^2.4.1",
"pretty-quick": "^3.1.1",
"qss": "^2.0.3",
"rimraf": "^3.0.2",
"rollup": "^2.53.3",
"rollup-plugin-analyzer": "^3.3.0",
"rollup": "^2.58.0",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-commonjs": "^10.1.0",

@@ -71,18 +71,18 @@ "rollup-plugin-dev": "^1.1.3",

"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.27.3",
"rollup-plugin-visualizer": "^4.2.2",
"rollup-plugin-typescript2": "^0.30.0",
"rollup-plugin-visualizer": "^5.5.2",
"rollup-plugin-web-worker-loader": "^1.6.1",
"serve": "^11.3.2",
"ts-jest": "^26.5.6",
"tslib": "^2.3.0",
"serve": "^12.0.1",
"ts-jest": "^27.0.5",
"tslib": "^2.3.1",
"tslint": "^6.1.3",
"tslint-config-security": "^1.16.0",
"typedoc": "^0.18.0",
"typescript": "^4.3.5",
"wait-on": "^5.3.0"
"typedoc": "0.18.0",
"typescript": "^4.4.3",
"wait-on": "^6.0.0"
},
"dependencies": {
"abortcontroller-polyfill": "^1.7.3",
"browser-tabs-lock": "^1.2.14",
"core-js": "^3.16.3",
"browser-tabs-lock": "^1.2.15",
"core-js": "^3.18.2",
"es-cookie": "^1.3.2",

@@ -89,0 +89,0 @@ "fast-text-encoding": "^1.0.3",

@@ -34,3 +34,3 @@ # @auth0/auth0-spa-js

```html
<script src="https://cdn.auth0.com/js/auth0-spa-js/1.18/auth0-spa-js.production.js"></script>
<script src="https://cdn.auth0.com/js/auth0-spa-js/1.19/auth0-spa-js.production.js"></script>
```

@@ -52,2 +52,24 @@

### Auth0 Configuration
Create a **Single Page Application** in the [Auth0 Dashboard](https://manage.auth0.com/#/applications).
> **If you're using an existing application**, verify that you have configured the following settings in your Single Page Application:
>
> - Click on the "Settings" tab of your application's page.
> - Ensure that "Token Endpoint Authentication Method" under "Application Properties" is set to "None"
> - Scroll down and click on the "Show Advanced Settings" link.
> - Under "Advanced Settings", click on the "OAuth" tab.
> - Ensure that "JsonWebToken Signature Algorithm" is set to `RS256` and that "OIDC Conformant" is enabled.
Next, configure the following URLs for your application under the "Application URIs" section of the "Settings" page:
- **Allowed Callback URLs**: `http://localhost:3000`
- **Allowed Logout URLs**: `http://localhost:3000`
- **Allowed Web Origins**: `http://localhost:3000`
> These URLs should reflect the origins that your application is running on. **Allowed Callback URLs** may also include a path, depending on where you're handling the callback (see below).
Take note of the **Client ID** and **Domain** values under the "Basic Information" section. You'll need these values in the next step.
### Creating the client

@@ -54,0 +76,0 @@

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

import { TokenEndpointOptions } from './global';
import { TokenEndpointOptions, TokenEndpointResponse } from './global';
import { DEFAULT_AUTH0_CLIENT } from './constants';

@@ -6,10 +6,2 @@ import { getJSON } from './http';

export type TokenEndpointResponse = {
id_token: string;
access_token: string;
refresh_token?: string;
expires_in: number;
scope?: string;
};
export async function oauthToken(

@@ -16,0 +8,0 @@ {

@@ -16,3 +16,3 @@ import Lock from 'browser-tabs-lock';

import { oauthToken, TokenEndpointResponse } from './api';
import { oauthToken } from './api';

@@ -49,3 +49,4 @@ import { getUniqueScopes } from './scope';

DEFAULT_AUTH0_CLIENT,
INVALID_REFRESH_TOKEN_ERROR_MESSAGE
INVALID_REFRESH_TOKEN_ERROR_MESSAGE,
DEFAULT_NOW_PROVIDER
} from './constants';

@@ -71,3 +72,5 @@

User,
IdToken
IdToken,
GetTokenSilentlyVerboseResponse,
TokenEndpointResponse
} from './global';

@@ -84,2 +87,12 @@

*/
type GetTokenSilentlyResult = TokenEndpointResponse & {
decodedToken: ReturnType<typeof verifyIdToken>;
scope: string;
oauthTokenScope?: string;
audience: string;
};
/**
* @ignore
*/
const lock = new Lock();

@@ -193,2 +206,3 @@

private isAuthenticatedCookieName: string;
private nowProvider: () => number | Promise<number>;

@@ -248,2 +262,4 @@ cacheLocation: CacheLocation;

this.nowProvider = this.options.nowProvider || DEFAULT_NOW_PROVIDER;
this.cacheManager = new CacheManager(

@@ -253,3 +269,4 @@ cache,

? new CacheKeyManifest(cache, this.options.client_id)
: null
: null,
this.nowProvider
);

@@ -335,3 +352,3 @@

private _verifyIdToken(
private async _verifyIdToken(
id_token: string,

@@ -341,2 +358,4 @@ nonce?: string,

) {
const now = await this.nowProvider();
return verifyIdToken({

@@ -349,3 +368,4 @@ iss: this.tokenIssuer,

leeway: this.options.leeway,
max_age: this._parseNumber(this.options.max_age)
max_age: this._parseNumber(this.options.max_age),
now
});

@@ -502,3 +522,3 @@ }

const decodedToken = this._verifyIdToken(
const decodedToken = await this._verifyIdToken(
authResult.id_token,

@@ -661,3 +681,3 @@ nonceIn,

const decodedToken = this._verifyIdToken(
const decodedToken = await this._verifyIdToken(
authResult.id_token,

@@ -668,3 +688,3 @@ transaction.nonce,

const cacheEntry = {
await this.cacheManager.set({
...authResult,

@@ -675,6 +695,4 @@ decodedToken,

client_id: this.options.client_id
};
});
await this.cacheManager.set(cacheEntry);
this.cookieStorage.save(this.isAuthenticatedCookieName, true, {

@@ -734,2 +752,22 @@ daysUntilExpire: this.sessionCheckExpiryDays

/**
* Fetches a new access token and returns the response from the /oauth/token endpoint, omitting the refresh token.
*
* @param options
*/
public async getTokenSilently(
options: GetTokenSilentlyOptions & { detailedResponse: true }
): Promise<GetTokenSilentlyVerboseResponse>;
/**
* Fetches a new access token and returns it.
*
* @param options
*/
public async getTokenSilently(
options?: GetTokenSilentlyOptions
): Promise<string>;
/**
* Fetches a new access token, and either returns just the access token (the default) or the response from the /oauth/token endpoint, depending on the `detailedResponse` option.
*
* ```js

@@ -760,3 +798,5 @@ * const token = await auth0.getTokenSilently(options);

*/
public async getTokenSilently(options: GetTokenSilentlyOptions = {}) {
public async getTokenSilently(
options: GetTokenSilentlyOptions = {}
): Promise<string | GetTokenSilentlyVerboseResponse> {
const { ignoreCache, ...getTokenOptions } = {

@@ -779,25 +819,19 @@ audience: this.options.audience,

private async _getTokenSilently(options: GetTokenSilentlyOptions = {}) {
private async _getTokenSilently(
options: GetTokenSilentlyOptions = {}
): Promise<string | GetTokenSilentlyVerboseResponse> {
const { ignoreCache, ...getTokenOptions } = options;
const getAccessTokenFromCache = async () => {
const cache = await this.cacheManager.get(
new CacheKey({
scope: getTokenOptions.scope,
audience: getTokenOptions.audience || 'default',
client_id: this.options.client_id
}),
60 // get a new token if within 60 seconds of expiring
);
return cache && cache.access_token;
};
// Check the cache before acquiring the lock to avoid the latency of
// `lock.acquireLock` when the cache is populated.
if (!ignoreCache) {
const accessToken = await getAccessTokenFromCache();
const entry = await this._getEntryFromCache({
scope: getTokenOptions.scope,
audience: getTokenOptions.audience || 'default',
client_id: this.options.client_id,
getDetailedEntry: options.detailedResponse
});
if (accessToken) {
return accessToken;
if (entry) {
return entry;
}

@@ -816,6 +850,11 @@ }

if (!ignoreCache) {
const accessToken = await getAccessTokenFromCache();
const entry = await this._getEntryFromCache({
scope: getTokenOptions.scope,
audience: getTokenOptions.audience || 'default',
client_id: this.options.client_id,
getDetailedEntry: options.detailedResponse
});
if (accessToken) {
return accessToken;
if (entry) {
return entry;
}

@@ -837,2 +876,18 @@ }

if (options.detailedResponse) {
const {
id_token,
access_token,
oauthTokenScope,
expires_in
} = authResult;
return {
id_token,
access_token,
...(oauthTokenScope ? { scope: oauthTokenScope } : null),
expires_in
};
}
return authResult.access_token;

@@ -975,3 +1030,3 @@ } finally {

options: GetTokenSilentlyOptions
): Promise<any> {
): Promise<GetTokenSilentlyResult> {
const stateIn = encode(createRandomString());

@@ -1052,3 +1107,6 @@ const nonceIn = encode(createRandomString());

const decodedToken = this._verifyIdToken(tokenResult.id_token, nonceIn);
const decodedToken = await this._verifyIdToken(
tokenResult.id_token,
nonceIn
);

@@ -1061,2 +1119,3 @@ this._processOrgIdHint(decodedToken.claims.org_id);

scope: params.scope,
oauthTokenScope: tokenResult.scope,
audience: params.audience || 'default'

@@ -1076,3 +1135,3 @@ };

options: GetTokenSilentlyOptions
): Promise<any> {
): Promise<GetTokenSilentlyResult> {
options.scope = getUniqueScopes(

@@ -1106,4 +1165,9 @@ this.defaultScope,

const { scope, audience, ignoreCache, timeoutInSeconds, ...customOptions } =
options;
const {
scope,
audience,
ignoreCache,
timeoutInSeconds,
...customOptions
} = options;

@@ -1149,3 +1213,3 @@ const timeout =

const decodedToken = this._verifyIdToken(tokenResult.id_token);
const decodedToken = await this._verifyIdToken(tokenResult.id_token);

@@ -1156,5 +1220,42 @@ return {

scope: options.scope,
oauthTokenScope: tokenResult.scope,
audience: options.audience || 'default'
};
}
private async _getEntryFromCache({
scope,
audience,
client_id,
getDetailedEntry = false
}: {
scope: string;
audience: string;
client_id: string;
getDetailedEntry?: boolean;
}) {
const entry = await this.cacheManager.get(
new CacheKey({
scope,
audience,
client_id
}),
60 // get a new token if within 60 seconds of expiring
);
if (entry && entry.access_token) {
if (getDetailedEntry) {
const { id_token, access_token, oauthTokenScope, expires_in } = entry;
return {
id_token,
access_token,
...(oauthTokenScope ? { scope: oauthTokenScope } : null),
expires_in
};
}
return entry.access_token;
}
}
}

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

import { DEFAULT_NOW_PROVIDER } from '../constants';
import { CacheKeyManifest } from './key-manifest';

@@ -14,3 +15,9 @@

export class CacheManager {
constructor(private cache: ICache, private keyManifest?: CacheKeyManifest) {}
constructor(
private cache: ICache,
private keyManifest?: CacheKeyManifest,
private nowProvider?: () => number | Promise<number>
) {
this.nowProvider = this.nowProvider || DEFAULT_NOW_PROVIDER;
}

@@ -39,3 +46,4 @@ async get(

const nowSeconds = Math.floor(Date.now() / 1000);
const now = await this.nowProvider();
const nowSeconds = Math.floor(now / 1000);

@@ -68,3 +76,3 @@ if (wrappedEntry.expiresAt - expiryAdjustmentSeconds < nowSeconds) {

const wrappedEntry = this.wrapCacheEntry(entry);
const wrappedEntry = await this.wrapCacheEntry(entry);

@@ -107,4 +115,5 @@ await this.cache.set(cacheKey.toKey(), wrappedEntry);

private wrapCacheEntry(entry: CacheEntry): WrappedCacheEntry {
const expiresInTime = Math.floor(Date.now() / 1000) + entry.expires_in;
private async wrapCacheEntry(entry: CacheEntry): Promise<WrappedCacheEntry> {
const now = await this.nowProvider();
const expiresInTime = Math.floor(now / 1000) + entry.expires_in;

@@ -111,0 +120,0 @@ const expirySeconds = Math.min(

@@ -71,2 +71,3 @@ import { IdToken, User } from '../global';

refresh_token?: string;
oauthTokenScope?: string;
};

@@ -73,0 +74,0 @@

@@ -79,1 +79,3 @@ import { PopupConfigOptions } from './global';

};
export const DEFAULT_NOW_PROVIDER = () => Date.now();
/**
* For context on the istanbul ignore statements below, see:
* https://github.com/gotwarlost/istanbul/issues/690
*/
/**
* Thrown when network requests to the Auth server fail.
*/
export class GenericError extends Error {
/* istanbul ignore next */
constructor(public error: string, public error_description: string) {
super(error_description) /* istanbul ignore next */;
super(error_description);
Object.setPrototypeOf(this, GenericError.prototype);

@@ -27,2 +32,3 @@ }

export class AuthenticationError extends GenericError {
/* istanbul ignore next */
constructor(

@@ -34,3 +40,3 @@ error: string,

) {
super(error, error_description) /* istanbul ignore next */;
super(error, error_description);
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work

@@ -46,4 +52,5 @@ Object.setPrototypeOf(this, AuthenticationError.prototype);

export class TimeoutError extends GenericError {
/* istanbul ignore next */
constructor() {
super('timeout', 'Timeout') /* istanbul ignore next */;
super('timeout', 'Timeout');
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work

@@ -58,4 +65,5 @@ Object.setPrototypeOf(this, TimeoutError.prototype);

export class PopupTimeoutError extends TimeoutError {
/* istanbul ignore next */
constructor(public popup: Window) {
super() /* istanbul ignore next */;
super();
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work

@@ -67,4 +75,5 @@ Object.setPrototypeOf(this, PopupTimeoutError.prototype);

export class PopupCancelledError extends GenericError {
/* istanbul ignore next */
constructor(public popup: Window) {
super('cancelled', 'Popup closed') /* istanbul ignore next */;
super('cancelled', 'Popup closed');
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work

@@ -79,2 +88,3 @@ Object.setPrototypeOf(this, PopupCancelledError.prototype);

export class MfaRequiredError extends GenericError {
/* istanbul ignore next */
constructor(

@@ -85,3 +95,3 @@ error: string,

) {
super(error, error_description) /* istanbul ignore next */;
super(error, error_description);
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work

@@ -88,0 +98,0 @@ Object.setPrototypeOf(this, MfaRequiredError.prototype);

@@ -215,2 +215,9 @@ import { ICache } from './cache';

useFormData?: boolean;
/**
* Modify the value used as the current time during the token validation.
*
* **Note**: Using this improperly can potentially compromise the token validation.
*/
nowProvider?: () => Promise<number> | number;
}

@@ -343,2 +350,10 @@

/**
* If true, the full response from the /oauth/token endpoint (or the cache, if the cache was used) is returned
* (minus `refresh_token` if one was issued). Otherwise, just the access token is returned.
*
* The default is `false`.
*/
detailedResponse?: boolean;
/**
* If you need to send custom parameters to the Authorization Server,

@@ -350,3 +365,9 @@ * make sure to use the original parameter name.

export interface GetTokenWithPopupOptions extends PopupLoginOptions {}
export interface GetTokenWithPopupOptions extends PopupLoginOptions {
/**
* When `true`, ignores the cache and always sends a
* request to Auth0.
*/
ignoreCache?: boolean;
}

@@ -458,2 +479,13 @@ export interface LogoutUrlOptions {

*/
export type TokenEndpointResponse = {
id_token: string;
access_token: string;
refresh_token?: string;
expires_in: number;
scope?: string;
};
/**
* @ignore
*/
export interface OAuthTokenOptions extends TokenEndpointOptions {

@@ -485,2 +517,3 @@ code_verifier: string;

organizationId?: string;
now?: number;
}

@@ -566,1 +599,6 @@

};
export type GetTokenSilentlyVerboseResponse = Omit<
Partial<TokenEndpointResponse>,
'refresh_token'
>;

@@ -162,3 +162,3 @@ import { urlDecodeB64 } from './utils';

const leeway = options.leeway || 60;
const now = new Date(Date.now());
const now = new Date(options.now || Date.now());
const expDate = new Date(0);

@@ -165,0 +165,0 @@ const nbfDate = new Date(0);

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

export default '1.18.0';
export default '1.19.0';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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