Comparing version 3.4.0 to 4.0.0-beta.0
{ | ||
"name": "auth0", | ||
"version": "3.4.0", | ||
"version": "4.0.0-beta.0", | ||
"description": "SDK for Auth0 API v2", | ||
"main": "src/index.js", | ||
"module": "src/index.mjs", | ||
"main": "dist/cjs/index.js", | ||
"types": "dist/types/index.d.ts", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"require": "./dist/cjs/index.js", | ||
"import": "./dist/esm/index.js", | ||
"types": "./dist/types/index.d.ts" | ||
} | ||
}, | ||
"sideEffects": false, | ||
"files": [ | ||
"src" | ||
"dist" | ||
], | ||
"scripts": { | ||
"test": "mocha --reporter spec './test/**/*.tests.js'", | ||
"test:ci": "nyc npm run test -- --forbid-only --reporter mocha-junit-reporter", | ||
"test:watch": "cross-env NODE_ENV=test mocha --timeout 5000 './test/**/*.tests.js' './test/*.tests.js' --watch", | ||
"jsdoc:generate": "jsdoc --configure .jsdoc.json --verbose", | ||
"prebuild": "rm -rf dist", | ||
"build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json && echo '{\"type\": \"commonjs\"}'> dist/cjs/package.json", | ||
"docs": "typedoc --options typedoc.cjs", | ||
"test": "npm run test:mocha && npm run test:jest", | ||
"test:mocha": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' mocha", | ||
"test:jest": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest", | ||
"test:ci": "c8 npm run test", | ||
"precommit": "pretty-quick --staged", | ||
"lint": "eslint ." | ||
"lint": "eslint ./src --ext ts", | ||
"start:playground": "node --experimental-specifier-resolution=node --no-warnings --loader ts-node/esm playground/index.ts" | ||
}, | ||
@@ -24,3 +36,3 @@ "repository": { | ||
"engines": { | ||
"node": ">=14" | ||
"node": ">=16" | ||
}, | ||
@@ -38,37 +50,39 @@ "keywords": [ | ||
"dependencies": { | ||
"axios": "^0.27.2", | ||
"form-data": "^3.0.1", | ||
"jsonwebtoken": "^9.0.0", | ||
"jwks-rsa": "^3.0.1", | ||
"lru-memoizer": "^2.1.4", | ||
"rest-facade": "^1.16.3", | ||
"retry": "^0.13.1", | ||
"form-data": "^4.0.0", | ||
"jose": "^4.13.2", | ||
"node-fetch": "^2.6.7", | ||
"uuid": "^9.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.3.4", | ||
"@types/chai-as-promised": "^7.1.5", | ||
"@types/jest": "^29.5.0", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node-fetch": "^2.6.3", | ||
"@types/uuid": "^9.0.1", | ||
"@typescript-eslint/eslint-plugin": "^5.58.0", | ||
"@typescript-eslint/parser": "^5.58.0", | ||
"c8": "^7.13.0", | ||
"chai": "^4.2.0", | ||
"cross-env": "^5.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"commander": "^10.0.1", | ||
"dotenv": "^16.0.3", | ||
"eslint": "^8.16.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-jsdoc": "^37.0.3", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"husky": "^3.0.1", | ||
"jsdoc": "^3.6.7", | ||
"json-loader": "^0.5.7", | ||
"jws": "^3.2.2", | ||
"minami": "^1.2.3", | ||
"mocha": "^8.4.0", | ||
"mocha-junit-reporter": "^2.0.0", | ||
"jest": "^29.5.0", | ||
"mocha": "^9.1.3", | ||
"nock": "^13.2.7", | ||
"nyc": "^14.1.1", | ||
"prettier": "2.4.1", | ||
"prettier": "^2.8.7", | ||
"pretty-quick": "^1.11.1", | ||
"proxyquire": "^2.1.3", | ||
"sinon": "^14.0.0", | ||
"string-replace-webpack-plugin": "0.1.3", | ||
"superagent-proxy": "^3.0.0", | ||
"webpack": "^4.36.1" | ||
"ts-jest": "^29.1.0", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.24.6", | ||
"typescript": "4.9.5" | ||
} | ||
} |
![Node.js client library for Auth0](https://cdn.auth0.com/website/sdks/banner/node-auth0-banner.png) | ||
> ⚠️ Please be aware that v4 is currently in <strong>Beta</strong>. Whilst we encourage you to test the update within your applications, we do no recommend using this version in production yet. | ||
![Release](https://img.shields.io/npm/v/auth0) | ||
@@ -9,7 +11,6 @@ [![Codecov](https://img.shields.io/codecov/c/github/auth0/node-auth0)](https://codecov.io/gh/auth0/node-auth0) | ||
📚 [Documentation](#documentation) - 🚀 [Getting Started](#getting-started) - 💻 [API Reference](#api-reference) - 💬 [Feedback](#feedback) | ||
📚 [Documentation](#documentation) - 🚀 [Getting Started](#getting-started) - 💬 [Feedback](#feedback) | ||
## Documentation | ||
- [FAQs](https://github.com/auth0/node-auth0/blob/master/FAQ.md) - frequently asked questions about node-auth0. | ||
- [Docs Site](https://auth0.com/docs) - explore our docs site and learn more about Auth0 | ||
@@ -23,3 +24,3 @@ | ||
- Node.js: `>=8.3.0` | ||
- Node.js: `>=16` | ||
@@ -31,3 +32,3 @@ ### Installation | ||
```bash | ||
npm install auth0 | ||
npm install auth0@beta | ||
``` | ||
@@ -39,3 +40,3 @@ | ||
This client must be used to access Auth0's [Authentication API](https://auth0.com/docs/api/authentication). | ||
This client can be used to access Auth0's [Authentication API](https://auth0.com/docs/api/authentication). | ||
@@ -45,7 +46,8 @@ The **AuthenticationClient** constructor takes an _optional_ client ID, if specified it will be used as default value for all endpoints that accept a client ID. | ||
```js | ||
var AuthenticationClient = require('auth0').AuthenticationClient; | ||
import { AuthenticationClient } from 'auth0'; | ||
var auth0 = new AuthenticationClient({ | ||
const auth0 = new AuthenticationClient({ | ||
domain: '{YOUR_ACCOUNT}.auth0.com', | ||
clientId: '{OPTIONAL_CLIENT_ID}', | ||
clientSecret: '{OPTIONAL_CLIENT_SECRET}', | ||
}); | ||
@@ -56,4 +58,2 @@ ``` | ||
> Note: When using the ManagementClient in a browser you should set `telemetry: false`. | ||
The Auth0 Management API is meant to be used by back-end servers or trusted parties performing administrative tasks. Generally speaking, anything that can be done through the Auth0 dashboard (and more) can also be done through this API. | ||
@@ -64,16 +64,20 @@ | ||
```js | ||
var ManagementClient = require('auth0').ManagementClient; | ||
import { ManagementClient } from 'auth0'; | ||
var management = new ManagementClient({ | ||
domain: '{YOUR_ACCOUNT}.auth0.com', | ||
token: '{YOUR_API_V2_TOKEN}', | ||
domain: '{YOUR_ACCOUNT}.auth0.com', | ||
}); | ||
``` | ||
For other examples see the [EXAMPLES.md](https://github.com/auth0/node-auth0/blob/master/EXAMPLES.md) document. | ||
Or, initialize your client class with a client secret and a domain. | ||
## API Reference | ||
```js | ||
import { ManagementClient } from 'auth0'; | ||
- [AuthenticationClient](https://auth0.github.io/node-auth0/AuthenticationClient.html) | ||
- [ManagementClient](https://auth0.github.io/node-auth0/ManagementClient.html) | ||
var management = new ManagementClient({ | ||
token: '{YOUR_API_V2_TOKEN}', | ||
domain: '{YOUR_ACCOUNT}.auth0.com', | ||
}); | ||
``` | ||
@@ -80,0 +84,0 @@ ## Feedback |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
4
109
0
Yes
7635
30
3
0
1
2
+ Addedjose@^4.13.2
+ Addednode-fetch@^2.6.7
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedaxios@^0.27.2
- Removedjsonwebtoken@^9.0.0
- Removedjwks-rsa@^3.0.1
- Removedlru-memoizer@^2.1.4
- Removedrest-facade@^1.16.3
- Removedretry@^0.13.1
- Removed@types/body-parser@1.19.5(transitive)
- Removed@types/connect@3.4.38(transitive)
- Removed@types/express@4.17.21(transitive)
- Removed@types/express-serve-static-core@4.19.6(transitive)
- Removed@types/http-errors@2.0.4(transitive)
- Removed@types/jsonwebtoken@9.0.7(transitive)
- Removed@types/mime@1.3.5(transitive)
- Removed@types/node@22.10.2(transitive)
- Removed@types/qs@6.9.17(transitive)
- Removed@types/range-parser@1.2.7(transitive)
- Removed@types/send@0.17.4(transitive)
- Removed@types/serve-static@1.15.7(transitive)
- Removedasap@2.0.6(transitive)
- Removedaxios@0.27.2(transitive)
- Removedbuffer-equal-constant-time@1.0.1(transitive)
- Removedcall-bind@1.0.8(transitive)
- Removedcall-bind-apply-helpers@1.0.1(transitive)
- Removedcall-bound@1.0.2(transitive)
- Removedcamel-case@1.2.2(transitive)
- Removedchange-case@2.3.1(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removedconstant-case@1.1.2(transitive)
- Removedcookiejar@2.1.4(transitive)
- Removeddebug@4.4.0(transitive)
- Removeddeepmerge@3.3.0(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddezalgo@1.0.4(transitive)
- Removeddot-case@1.1.2(transitive)
- Removeddunder-proto@1.0.0(transitive)
- Removedecdsa-sig-formatter@1.0.11(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.0.0(transitive)
- Removedfast-safe-stringify@2.1.1(transitive)
- Removedfollow-redirects@1.15.9(transitive)
- Removedform-data@3.0.2(transitive)
- Removedformidable@2.1.2(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.6(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhexoid@1.0.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-lower-case@1.1.3(transitive)
- Removedis-upper-case@1.1.2(transitive)
- Removedjsonwebtoken@9.0.2(transitive)
- Removedjwa@1.4.1(transitive)
- Removedjwks-rsa@3.1.0(transitive)
- Removedjws@3.2.2(transitive)
- Removedlimiter@1.1.5(transitive)
- Removedlodash.clonedeep@4.5.0(transitive)
- Removedlodash.get@4.4.2(transitive)
- Removedlodash.includes@4.3.0(transitive)
- Removedlodash.isboolean@3.0.3(transitive)
- Removedlodash.isinteger@4.0.4(transitive)
- Removedlodash.isnumber@3.0.3(transitive)
- Removedlodash.isplainobject@4.0.6(transitive)
- Removedlodash.isstring@4.0.1(transitive)
- Removedlodash.once@4.1.1(transitive)
- Removedlower-case@1.1.4(transitive)
- Removedlower-case-first@1.0.2(transitive)
- Removedlru-cache@6.0.0(transitive)
- Removedlru-memoizer@2.3.0(transitive)
- Removedmath-intrinsics@1.0.0(transitive)
- Removedmethods@1.1.2(transitive)
- Removedmime@2.6.0(transitive)
- Removedms@2.1.3(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedonce@1.4.0(transitive)
- Removedparam-case@1.1.2(transitive)
- Removedpascal-case@1.1.2(transitive)
- Removedpath-case@1.1.2(transitive)
- Removedqs@6.13.1(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedrest-facade@1.16.4(transitive)
- Removedretry@0.13.1(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsemver@7.6.3(transitive)
- Removedsentence-case@1.1.3(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedside-channel@1.1.0(transitive)
- Removedside-channel-list@1.0.0(transitive)
- Removedside-channel-map@1.0.1(transitive)
- Removedside-channel-weakmap@1.0.2(transitive)
- Removedsnake-case@1.1.2(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedsuperagent@7.1.6(transitive)
- Removedswap-case@1.1.2(transitive)
- Removedtitle-case@1.1.2(transitive)
- Removedundici-types@6.20.0(transitive)
- Removedupper-case@1.1.3(transitive)
- Removedupper-case-first@1.1.2(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedyallist@4.0.0(transitive)
Updatedform-data@^4.0.0