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

auth0

Package Overview
Dependencies
Maintainers
49
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.1.0 to 4.2.0

85

dist/cjs/auth/oauth.d.ts

@@ -10,3 +10,3 @@ import { InitOverride, JSONApiResponse, VoidApiResponse } from '../lib/runtime.js';

/**
* The refresh token, vavailable with the `offline_access` scope.
* The refresh token, available with the `offline_access` scope.
*/

@@ -23,3 +23,3 @@ refresh_token?: string;

/**
* The duration in secs that that the access token is valid.
* The duration in secs that the access token is valid.
*/

@@ -82,2 +82,63 @@ expires_in: number;

}
export interface PushedAuthorizationRequest extends ClientCredentials {
/**
* URI to redirect to.
*/
redirect_uri: string;
/**
* The response_type the client expects.
*/
response_type: string;
/**
* The response_mode to use.
*/
response_mode?: string;
/**
* The nonce.
*/
nonce?: string;
/**
* State value to be passed back on successful authorization.
*/
state?: string;
/**
* Name of the connection.
*/
connection?: string;
/**
* Scopes to request. Multiple scopes must be separated by a space character.
*/
scope?: string;
/**
* The unique identifier of the target API you want to access.
*/
audience?: string;
/**
* The organization to log the user in to.
*/
organization?: string;
/**
* The id of an invitation to accept.
*/
invitation?: string;
/**
* A Base64-encoded SHA-256 hash of the {@link AuthorizationCodeGrantWithPKCERequest.code_verifier} used for the Authorization Code Flow with PKCE.
*/
code_challenge?: string;
/**
* Allow for any custom property to be sent to Auth0
*/
[key: string]: any;
}
export interface PushedAuthorizationResponse {
/**
* The request URI corresponding to the authorization request posted.
* This URI is a single-use reference to the respective request data in the subsequent authorization request.
*/
request_uri: string;
/**
* This URI is a single-use reference to the respective request data in the subsequent authorization request.
*/
expires_in: number;
}
export interface PasswordGrantRequest extends ClientCredentials {

@@ -231,2 +292,22 @@ /**

/**
* This is the OAuth 2.0 extension that allows to initiate an OAuth flow from the backchannel instead of by building a URL.
*
*
* See: https://www.rfc-editor.org/rfc/rfc9126.html
*
* @example
* ```js
* const auth0 = new AuthenticationApi({
* domain: 'my-domain.auth0.com',
* clientId: 'myClientId',
* clientSecret: 'myClientSecret'
* });
*
* await auth0.oauth.pushedAuthorization({ response_type: 'id_token', redirect_uri: 'http://localhost' });
* ```
*/
pushedAuthorization(bodyParameters: PushedAuthorizationRequest, options?: {
initOverrides?: InitOverride;
}): Promise<JSONApiResponse<PushedAuthorizationResponse>>;
/**
* This information is typically received from a highly trusted public client like a SPA*.

@@ -233,0 +314,0 @@ * (<strong>*Note:</string> For single-page applications and native/mobile apps, we recommend using web flows instead.)

@@ -86,2 +86,35 @@ "use strict";

/**
* This is the OAuth 2.0 extension that allows to initiate an OAuth flow from the backchannel instead of by building a URL.
*
*
* See: https://www.rfc-editor.org/rfc/rfc9126.html
*
* @example
* ```js
* const auth0 = new AuthenticationApi({
* domain: 'my-domain.auth0.com',
* clientId: 'myClientId',
* clientSecret: 'myClientSecret'
* });
*
* await auth0.oauth.pushedAuthorization({ response_type: 'id_token', redirect_uri: 'http://localhost' });
* ```
*/
async pushedAuthorization(bodyParameters, options = {}) {
(0, runtime_js_1.validateRequiredRequestParams)(bodyParameters, ['client_id', 'response_type', 'redirect_uri']);
const bodyParametersWithClientAuthentication = await this.addClientAuthentication(bodyParameters);
const response = await this.request({
path: '/oauth/par',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
client_id: this.clientId,
...bodyParametersWithClientAuthentication,
}),
}, options.initOverrides);
return runtime_js_1.JSONApiResponse.fromResponse(response);
}
/**
* This information is typically received from a highly trusted public client like a SPA*.

@@ -88,0 +121,0 @@ * (<strong>*Note:</string> For single-page applications and native/mobile apps, we recommend using web flows instead.)

2

dist/cjs/version.d.ts

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

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

@@ -10,3 +10,3 @@ import { InitOverride, JSONApiResponse, VoidApiResponse } from '../lib/runtime.js';

/**
* The refresh token, vavailable with the `offline_access` scope.
* The refresh token, available with the `offline_access` scope.
*/

@@ -23,3 +23,3 @@ refresh_token?: string;

/**
* The duration in secs that that the access token is valid.
* The duration in secs that the access token is valid.
*/

@@ -82,2 +82,63 @@ expires_in: number;

}
export interface PushedAuthorizationRequest extends ClientCredentials {
/**
* URI to redirect to.
*/
redirect_uri: string;
/**
* The response_type the client expects.
*/
response_type: string;
/**
* The response_mode to use.
*/
response_mode?: string;
/**
* The nonce.
*/
nonce?: string;
/**
* State value to be passed back on successful authorization.
*/
state?: string;
/**
* Name of the connection.
*/
connection?: string;
/**
* Scopes to request. Multiple scopes must be separated by a space character.
*/
scope?: string;
/**
* The unique identifier of the target API you want to access.
*/
audience?: string;
/**
* The organization to log the user in to.
*/
organization?: string;
/**
* The id of an invitation to accept.
*/
invitation?: string;
/**
* A Base64-encoded SHA-256 hash of the {@link AuthorizationCodeGrantWithPKCERequest.code_verifier} used for the Authorization Code Flow with PKCE.
*/
code_challenge?: string;
/**
* Allow for any custom property to be sent to Auth0
*/
[key: string]: any;
}
export interface PushedAuthorizationResponse {
/**
* The request URI corresponding to the authorization request posted.
* This URI is a single-use reference to the respective request data in the subsequent authorization request.
*/
request_uri: string;
/**
* This URI is a single-use reference to the respective request data in the subsequent authorization request.
*/
expires_in: number;
}
export interface PasswordGrantRequest extends ClientCredentials {

@@ -231,2 +292,22 @@ /**

/**
* This is the OAuth 2.0 extension that allows to initiate an OAuth flow from the backchannel instead of by building a URL.
*
*
* See: https://www.rfc-editor.org/rfc/rfc9126.html
*
* @example
* ```js
* const auth0 = new AuthenticationApi({
* domain: 'my-domain.auth0.com',
* clientId: 'myClientId',
* clientSecret: 'myClientSecret'
* });
*
* await auth0.oauth.pushedAuthorization({ response_type: 'id_token', redirect_uri: 'http://localhost' });
* ```
*/
pushedAuthorization(bodyParameters: PushedAuthorizationRequest, options?: {
initOverrides?: InitOverride;
}): Promise<JSONApiResponse<PushedAuthorizationResponse>>;
/**
* This information is typically received from a highly trusted public client like a SPA*.

@@ -233,0 +314,0 @@ * (<strong>*Note:</string> For single-page applications and native/mobile apps, we recommend using web flows instead.)

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

import { VoidApiResponse, validateRequiredRequestParams, } from '../lib/runtime.js';
import { JSONApiResponse, VoidApiResponse, validateRequiredRequestParams, } from '../lib/runtime.js';
import { BaseAuthAPI, grant } from './base-auth-api.js';

@@ -83,2 +83,35 @@ import { IDTokenValidator } from './id-token-validator.js';

/**
* This is the OAuth 2.0 extension that allows to initiate an OAuth flow from the backchannel instead of by building a URL.
*
*
* See: https://www.rfc-editor.org/rfc/rfc9126.html
*
* @example
* ```js
* const auth0 = new AuthenticationApi({
* domain: 'my-domain.auth0.com',
* clientId: 'myClientId',
* clientSecret: 'myClientSecret'
* });
*
* await auth0.oauth.pushedAuthorization({ response_type: 'id_token', redirect_uri: 'http://localhost' });
* ```
*/
async pushedAuthorization(bodyParameters, options = {}) {
validateRequiredRequestParams(bodyParameters, ['client_id', 'response_type', 'redirect_uri']);
const bodyParametersWithClientAuthentication = await this.addClientAuthentication(bodyParameters);
const response = await this.request({
path: '/oauth/par',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
client_id: this.clientId,
...bodyParametersWithClientAuthentication,
}),
}, options.initOverrides);
return JSONApiResponse.fromResponse(response);
}
/**
* This information is typically received from a highly trusted public client like a SPA*.

@@ -85,0 +118,0 @@ * (<strong>*Note:</string> For single-page applications and native/mobile apps, we recommend using web flows instead.)

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

export declare const version = "4.1.0";
export declare const version = "4.2.0";

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

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

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

@@ -47,3 +47,3 @@ ![Node.js client library for Auth0](https://cdn.auth0.com/website/sdks/banner/node-auth0-banner.png)

See [more examples](./EXAMPLES.md#authentication-client).
See [more examples](https://github.com/auth0/node-auth0/blob/master/EXAMPLES.md#authentication-client).

@@ -77,3 +77,3 @@ #### Management API Client

See [more examples](./EXAMPLES.md#management-client).
See [more examples](https://github.com/auth0/node-auth0/blob/master/EXAMPLES.md#management-client).

@@ -80,0 +80,0 @@ ## API Reference

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