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

auth0

Package Overview
Dependencies
Maintainers
40
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 2.28.0 to 2.29.0

19

CHANGELOG.md
# Change Log
## [v2.29.0](https://github.com/auth0/node-auth0/tree/v2.29.0) (2020-09-23)
**Added**
- Adding support for prompts and custom texts [\#533](https://github.com/auth0/node-auth0/pull/533) ([davidpatrick](https://github.com/davidpatrick))
- Adding call to invalidate all remembered browsers. [\#528](https://github.com/auth0/node-auth0/pull/528) ([tandrup](https://github.com/tandrup))
- Adding docs for secondary and federated identity email verification [\#519](https://github.com/auth0/node-auth0/pull/519) ([jimmyjames](https://github.com/jimmyjames))
**Changed**
- Update dependencies [\#535](https://github.com/auth0/node-auth0/pull/535) ([davidpatrick](https://github.com/davidpatrick))
- Update jwks-rsa dependency to avoid DeprecationWarning Buffer() [\#534](https://github.com/auth0/node-auth0/pull/534) ([jalie](https://github.com/jalie))
**Security**
- [Security] Bump node-fetch from 2.6.0 to 2.6.1 [\#532](https://github.com/auth0/node-auth0/pull/532) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
[Full Changelog](https://github.com/auth0/node-auth0/compare/v2.28.0...v2.29.0)
## [v2.28.0](https://github.com/auth0/node-auth0/tree/v2.28.0) (2020-08-27)

@@ -4,0 +23,0 @@

6

package.json
{
"name": "auth0",
"version": "2.28.0",
"version": "2.29.0",
"description": "SDK for Auth0 API v2",

@@ -37,3 +37,3 @@ "main": "src/index.js",

"jsonwebtoken": "^8.5.1",
"jwks-rsa": "^1.8.0",
"jwks-rsa": "^1.10.0",
"lru-memoizer": "^2.1.0",

@@ -46,3 +46,3 @@ "object.assign": "^4.1.0",

"chai": "^4.2.0",
"codecov": "^3.7.0",
"codecov": "^3.7.2",
"cross-env": "^5.2.0",

@@ -49,0 +49,0 @@ "husky": "^3.0.1",

@@ -8,2 +8,3 @@ # node-auth0

[![Downloads][downloads-image]][downloads-url]
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2Fnode-auth0.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2Fnode-auth0?ref=badge_shield)

@@ -162,1 +163,4 @@ Node.js client library for the [Auth0](https://auth0.com) platform.

[downloads-url]: https://npmjs.org/package/auth0
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2Fnode-auth0.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2Fnode-auth0?ref=badge_large)

@@ -364,2 +364,6 @@ var axios = require('axios');

* @param {String} data.user_id ID of the user to be verified.
* @param {String} [data.client_id] client_id of the client (application). If no value provided, the global Client ID will be used.
* @param {Object} [data.identity] Used to verify secondary, federated, and passwordless-email identities.
* @param {String} data.identity.user_id user_id of the identity.
* @param {String} data.identity.provider provider of the identity.
* @param {Function} [cb] Callback function.

@@ -366,0 +370,0 @@ *

@@ -54,2 +54,19 @@ var ArgumentError = require('rest-facade').ArgumentError;

this.resource = new RetryRestClient(auth0RestClient, options.retry);
/**
* Retrieve custom text for a specific prompt and language.
* {@link https://auth0.com/docs/api/management/v2#!/Prompts/get_custom_text_by_language Custom Text endpoint}
*
*
* @type {external:RestClient}
*/
var customTextByLanguageAuth0RestClient = new Auth0RestClient(
options.baseUrl + '/prompts/:prompt/custom-text/:language',
clientOptions,
options.tokenProvider
);
this.customTextByLanguage = new RetryRestClient(
customTextByLanguageAuth0RestClient,
options.retry
);
};

@@ -105,2 +122,91 @@

/**
* Retrieve custom text for a specific prompt and language.
*
* @method getCustomTextByLanguage
* @memberOf module:management.PromptsManager.prototype
*
* @example
* var params = { prompt: PROMPT_NAME, language: LANGUAGE };
*
* management.prompts.getCustomTextByLanguage(params, function (err, customText) {
* if (err) {
* // Handle error.
* }
*
* console.log('CustomText', customText);
* });
*
* @param {Object} params Data object.
* @param {String} params.prompt Name of the prompt.
* @param {String} params.language Language to retrieve.
* @param {Function} [cb] Callback function
*
* @return {Promise|undefined}
*/
PromptsManager.prototype.getCustomTextByLanguage = function(params, cb) {
params = params || {};
if (!params.prompt || typeof params.prompt !== 'string') {
throw new ArgumentError('The prompt parameter must be a string');
}
if (!params.language || typeof params.language !== 'string') {
throw new ArgumentError('The language parameter must be a string');
}
if (cb && cb instanceof Function) {
return this.customTextByLanguage.get(params, cb);
}
return this.customTextByLanguage.get(params);
};
/**
* Set custom text for a specific prompt.
*
* @method updateCustomTextByLanguage
* @memberOf module:management.PromptsManager.prototype
*
* @example
* var params = { prompt: PROMPT_NAME, language: LANGUAGE, body: BODY_OBJECT };
*
* management.prompts.updateCustomTextByLanguage(params, function (err, customText) {
* if (err) {
* // Handle error.
* }
*
* console.log('CustomText', customText);
* });
*
* @param {Object} params Data object.
* @param {String} params.prompt Name of the prompt.
* @param {String} params.language Language to retrieve.
* @param {Object} params.body An object containing custom dictionaries for a group of screens.
* @param {Function} [cb] Callback function
*
* @return {Promise|undefined}
*/
PromptsManager.prototype.updateCustomTextByLanguage = function(params, cb) {
params = params || {};
if (!params.prompt || typeof params.prompt !== 'string') {
throw new ArgumentError('The prompt parameter must be a string');
}
if (!params.language || typeof params.language !== 'string') {
throw new ArgumentError('The language parameter must be a string');
}
if (!params.body || typeof params.body !== 'object') {
throw new ArgumentError('The body parameter must be an object');
}
if (cb && cb instanceof Function) {
return this.customTextByLanguage.update(params, params.body, cb);
}
return this.customTextByLanguage.update(params, params.body);
};
module.exports = PromptsManager;

@@ -101,2 +101,10 @@ var ArgumentError = require('rest-facade').ArgumentError;

*
* @param {Object} data
* @param {String} [data.result_url] URL the user will be redirected to once ticket is used.
* @param {String} data.user_id user_id for whom the ticket should be created.
* @param {Integer} [data.ttl_sec] Number of seconds for which the ticket is valid before expiration.
* @param {Boolean} [data.includeEmailInRedirect] Whether to include the email address as part of the result_url (true), or not (false).
* @param {Object} [data.identity] Used to verify secondary, federated, and passwordless-email identities.
* @param {String} data.identity.user_id user_id of the identity.
* @param {String} data.identity.provider provider of the identity.
* @param {Function} [cb] Callback function.

@@ -103,0 +111,0 @@ * @return {Promise}

@@ -126,2 +126,17 @@ var ArgumentError = require('rest-facade').ArgumentError;

/**
* Provides an abstraction layer for invalidating all remembered browsers for MFA.
*
* @type {external:RestClient}
*/
var invalidateRememberBrowserAuth0RestClients = new Auth0RestClient(
options.baseUrl + '/users/:id/multifactor/actions/invalidate-remember-browser',
clientOptions,
options.tokenProvider
);
this.invalidateRememberBrowsers = new RetryRestClient(
invalidateRememberBrowserAuth0RestClients,
options.retry
);
/**
* Provides an abstraction layer for CRD on roles for a user

@@ -652,2 +667,35 @@ *

/**
* Invalidate all remembered browsers for MFA.
*
* @method invalidateRememberBrowser
* @memberOf module:management.UsersManager.prototype
*
* @example
* management.users.invalidateRememberBrowser({ id: USER_ID }, function (err, result) {
* if (err) {
* // Handle error.
* }
*
* // Invalidated all remembered browsers.
* });
*
* @param {Object} params The user data object.
* @param {String} params.id The user id.
* @param {Function} [cb] Callback function.
*
* @return {Promise|undefined}
*/
UsersManager.prototype.invalidateRememberBrowser = function(params, cb) {
if (!params || !params.id) {
throw new ArgumentError('The userId cannot be null or undefined');
}
if (cb && cb instanceof Function) {
return this.invalidateRememberBrowsers.create(params, {}, cb);
}
return this.invalidateRememberBrowsers.create(params, {});
};
/**
* Get a list of roles for a user.

@@ -654,0 +702,0 @@ *

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

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