auth0 2.36.1 → 2.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +557 -0
  2. package/README.md +33 -11
  3. package/package.json +22 -15
  4. package/src/Auth0RestClient.js +72 -71
  5. package/src/RetryRestClient.js +78 -81
  6. package/src/auth/DatabaseAuthenticator.js +242 -259
  7. package/src/auth/OAUthWithIDTokenValidation.js +99 -103
  8. package/src/auth/OAuthAuthenticator.js +325 -344
  9. package/src/auth/PasswordlessAuthenticator.js +238 -252
  10. package/src/auth/TokensManager.js +231 -246
  11. package/src/auth/UsersManager.js +149 -160
  12. package/src/auth/idToken.js +22 -19
  13. package/src/auth/index.js +510 -581
  14. package/src/errors.js +23 -23
  15. package/src/index.js +3 -2
  16. package/src/management/ActionsManager.js +503 -585
  17. package/src/management/BlacklistedTokensManager.js +77 -84
  18. package/src/management/BrandingManager.js +141 -163
  19. package/src/management/ClientGrantsManager.js +132 -145
  20. package/src/management/ClientsManager.js +145 -161
  21. package/src/management/ConnectionsManager.js +215 -204
  22. package/src/management/CustomDomainsManager.js +140 -157
  23. package/src/management/DeviceCredentialsManager.js +95 -111
  24. package/src/management/EmailProviderManager.js +110 -128
  25. package/src/management/EmailTemplatesManager.js +96 -112
  26. package/src/management/GrantsManager.js +94 -101
  27. package/src/management/GuardianManager.js +381 -455
  28. package/src/management/HooksManager.js +283 -325
  29. package/src/management/JobsManager.js +310 -343
  30. package/src/management/LogStreamsManager.js +142 -158
  31. package/src/management/LogsManager.js +92 -99
  32. package/src/management/ManagementTokenProvider.js +112 -120
  33. package/src/management/MigrationsManager.js +81 -90
  34. package/src/management/OrganizationsManager.js +686 -761
  35. package/src/management/PromptsManager.js +160 -182
  36. package/src/management/ResourceServersManager.js +143 -160
  37. package/src/management/RolesManager.js +323 -369
  38. package/src/management/RulesConfigsManager.js +94 -110
  39. package/src/management/RulesManager.js +154 -176
  40. package/src/management/StatsManager.js +87 -103
  41. package/src/management/TenantManager.js +81 -97
  42. package/src/management/TicketsManager.js +107 -115
  43. package/src/management/UserBlocksManager.js +135 -162
  44. package/src/management/UsersManager.js +729 -852
  45. package/src/management/index.js +3094 -3619
  46. package/src/utils.js +31 -60
package/CHANGELOG.md ADDED
@@ -0,0 +1,557 @@
1
+ # Change Log
2
+
3
+ ## [v2.38.1](https://github.com/auth0/node-auth0/tree/v2.38.1) (2022-01-27)
4
+
5
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.38.0...v2.38.1)
6
+
7
+ **Fixed**
8
+
9
+ - Fix wrong property in `assignRolestoUser` [\#700](https://github.com/auth0/node-auth0/pull/700) ([adamjmcgrath](https://github.com/adamjmcgrath))
10
+ - signIn method should provide using audience prop in userData [\#699](https://github.com/auth0/node-auth0/pull/699) ([maxism](https://github.com/maxism))
11
+
12
+ ## [v2.38.0](https://github.com/auth0/node-auth0/tree/v2.38.0) (2022-01-26)
13
+
14
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.37.0...v2.38.0)
15
+
16
+ **Changed**
17
+
18
+ - refactor to es6 syntax with classes [\#665](https://github.com/auth0/node-auth0/pull/665) ([hornta](https://github.com/hornta))
19
+
20
+ **Fixed**
21
+
22
+ - [SDK-3030] Wrong url when doing assign users with a callback [\#686](https://github.com/auth0/node-auth0/pull/686) ([adamjmcgrath](https://github.com/adamjmcgrath))
23
+
24
+ ## [v2.37.0](https://github.com/auth0/node-auth0/tree/v2.37.0) (2021-10-14)
25
+
26
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.36.2...v2.37.0)
27
+
28
+ **Added**
29
+
30
+ - Add support for checking connection status [\#662](https://github.com/auth0/node-auth0/pull/662) ([frederikprijck](https://github.com/frederikprijck))
31
+
32
+ **Fixed**
33
+
34
+ - Fix undefined tokenProvider when access token is provided. [\#642](https://github.com/auth0/node-auth0/pull/642) ([Gilighost](https://github.com/Gilighost))
35
+
36
+ ## [v2.36.2](https://github.com/auth0/node-auth0/tree/v2.36.2) (2021-09-20)
37
+
38
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.36.1...v2.36.2)
39
+
40
+ **Security**
41
+
42
+ - [Snyk] Security upgrade rest-facade from 1.13.0 to 1.13.1 [\#653](https://github.com/auth0/node-auth0/pull/653) ([snyk-bot](https://github.com/snyk-bot))
43
+ - [Snyk] Security upgrade axios from 0.21.1 to 0.21.3 [\#649](https://github.com/auth0/node-auth0/pull/649) ([snyk-bot](https://github.com/snyk-bot))
44
+
45
+ ## [v2.36.1](https://github.com/auth0/node-auth0/tree/v2.36.1) (2021-07-28)
46
+
47
+ **Fixed**
48
+
49
+ - Fix docs for rate limit default maxRetries [\#640](https://github.com/auth0/node-auth0/pull/640) ([jimmyjames](https://github.com/jimmyjames))
50
+ - Fix updateCustomTextByLanguage [\#638](https://github.com/auth0/node-auth0/pull/638) ([davidpatrick](https://github.com/davidpatrick))
51
+
52
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.36.0...v2.36.1)
53
+
54
+ ## [v2.36.0](https://github.com/auth0/node-auth0/tree/v2.36.0) (2021-07-23)
55
+
56
+ **Added**
57
+
58
+ - [SDK-2666] Update endpoint methods to document allowance of 'from' and 'take' checkpoint pagination parameters [\#634](https://github.com/auth0/node-auth0/pull/634) ([evansims](https://github.com/evansims))
59
+
60
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.35.1...v2.36.0)
61
+
62
+ ## [v2.35.1](https://github.com/auth0/node-auth0/tree/v2.35.1) (2021-06-21)
63
+
64
+ **Fixed**
65
+
66
+ - Update `setUniversalLoginTemplate` example to correctly reflect documentation [\#624](https://github.com/auth0/node-auth0/pull/624) ([mendhak](https://github.com/mendhak))
67
+ - Use id instead of action_id as per the mgmt api. [\#622](https://github.com/auth0/node-auth0/pull/622) ([stevezau](https://github.com/stevezau))
68
+
69
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.35.0...v2.35.1)
70
+
71
+ ## [v2.35.0](https://github.com/auth0/node-auth0/tree/v2.35.0) (2021-05-17)
72
+
73
+ **Added**
74
+
75
+ - Add method to verify OTP received via email [\#620](https://github.com/auth0/node-auth0/pull/620) ([alexesprit](https://github.com/alexesprit))
76
+ - [actionsManager] Adding new Actions Managment APIs [\#570](https://github.com/auth0/node-auth0/pull/570) ([shushen](https://github.com/shushen))
77
+
78
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.34.2...v2.35.0)
79
+
80
+ ## [v2.34.2](https://github.com/auth0/node-auth0/tree/v2.34.2) (2021-04-12)
81
+
82
+ **Fixed**
83
+
84
+ - [SDK-2484] Encode user ids on patch/update/delete [\#608](https://github.com/auth0/node-auth0/pull/608) ([davidpatrick](https://github.com/davidpatrick))
85
+
86
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.34.1...v2.34.2)
87
+
88
+ ## [v2.34.1](https://github.com/auth0/node-auth0/tree/v2.34.1) (2021-04-01)
89
+
90
+ **Fixed**
91
+
92
+ - Small fix to ManagementTokenProvider Cache [\#604](https://github.com/auth0/node-auth0/pull/604) ([davidpatrick](https://github.com/davidpatrick))
93
+
94
+ **Security**
95
+
96
+ - Bump y18n from 4.0.0 to 4.0.1 [\#602](https://github.com/auth0/node-auth0/pull/602) ([dependabot-preview](https://github.com/dependabot-preview))
97
+ - Security upgrade jwks-rsa from 1.10.0 to 1.12.1 [\#601](https://github.com/auth0/node-auth0/pull/601) ([snyk-bot](https://github.com/snyk-bot))
98
+
99
+ ## [v2.34.0](https://github.com/auth0/node-auth0/tree/v2.34.0) (2021-03-24)
100
+
101
+ **Added**
102
+
103
+ - feat(orgs): Support Organization feature [\#592](https://github.com/auth0/node-auth0/pull/592) ([mcastany](https://github.com/mcastany))
104
+ - Org idtoken validation support [\#597](https://github.com/auth0/node-auth0/pull/597) ([davidpatrick](https://github.com/davidpatrick))
105
+ - Allow passwordless SMS code verification to use token endpoint [\#591](https://github.com/auth0/node-auth0/pull/591) ([jimmyjames](https://github.com/jimmyjames))
106
+
107
+ **Changed**
108
+
109
+ - Doc Updates [\#599](https://github.com/auth0/node-auth0/pull/599) ([davidpatrick](https://github.com/davidpatrick))
110
+ - Update get role users docs [\#587](https://github.com/auth0/node-auth0/pull/587) ([jhiner](https://github.com/jhiner))
111
+ - revokeRefreshToken method is missing in docs [\#584](https://github.com/auth0/node-auth0/issues/584)
112
+
113
+ **Security**
114
+
115
+ - [Security] Bump elliptic from 6.5.3 to 6.5.4 [\#589](https://github.com/auth0/node-auth0/pull/589) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
116
+
117
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.33.0...v2.34.0)
118
+
119
+ ## [v2.33.0](https://github.com/auth0/node-auth0/tree/v2.33.0) (2021-02-05)
120
+
121
+ **Added**
122
+
123
+ - feat: add revokeRefreshToken [\#579](https://github.com/auth0/node-auth0/pull/579) ([andreafspeziale](https://github.com/andreafspeziale))
124
+ - ULP-2609/ULP-2914: add page templates support to /branding [\#574](https://github.com/auth0/node-auth0/pull/574) ([sebadoom](https://github.com/sebadoom))
125
+
126
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.32.0...v2.33.0)
127
+
128
+ ## [v2.32.0](https://github.com/auth0/node-auth0/tree/v2.32.0) (2021-01-21)
129
+
130
+ **Added**
131
+
132
+ - Additional options on getByEmail [SDK-2268][\#577](https://github.com/auth0/node-auth0/pull/577) ([davidpatrick](https://github.com/davidpatrick))
133
+ - [SDK-2261] Add forwardFor support to passwordless calls [\#576](https://github.com/auth0/node-auth0/pull/576) ([frederikprijck](https://github.com/frederikprijck))
134
+ - Adding Support for Guardian factor settings endpoints [\#569](https://github.com/auth0/node-auth0/pull/569) ([JayHelton](https://github.com/JayHelton))
135
+
136
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.31.1...v2.32.0)
137
+
138
+ ## [v2.31.1](https://github.com/auth0/node-auth0/tree/v2.31.1) (2021-01-05)
139
+
140
+ **Fixed**
141
+
142
+ - Expose getJobErrors to management client [\#563](https://github.com/auth0/node-auth0/pull/563) ([davidaubin19](https://github.com/davidaubin19))
143
+ - Fix passing a custom User-Agent to Axios. [\#562](https://github.com/auth0/node-auth0/pull/562) ([djanowski](https://github.com/djanowski))
144
+ - Expose assignUsersToRole to ManagementClient [\#561](https://github.com/auth0/node-auth0/pull/561) ([davidaubin19](https://github.com/davidaubin19))
145
+
146
+ **Security**
147
+
148
+ - [Security] Bump axios from 0.19.2 to 0.21.1 [\#565](https://github.com/auth0/node-auth0/pull/565) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
149
+
150
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.31.0...v2.31.1)
151
+
152
+ ## [v2.31.0](https://github.com/auth0/node-auth0/tree/v2.31.0) (2020-12-08)
153
+
154
+ **Added**
155
+
156
+ - Updated documentation on Link Users [\#558](https://github.com/auth0/node-auth0/pull/558) ([davidpatrick](https://github.com/davidpatrick))
157
+ - Add support for new passwordless endpoint [\#556](https://github.com/auth0/node-auth0/pull/556) ([nbandarchi](https://github.com/nbandarchi))
158
+
159
+ **Fixed**
160
+
161
+ - Adds importUsersJob to ManagementClient [\#553](https://github.com/auth0/node-auth0/pull/553) ([mikemeerschaert](https://github.com/mikemeerschaert))
162
+
163
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.30.0...v2.31.0)
164
+
165
+ ## [v2.30.0](https://github.com/auth0/node-auth0/tree/v2.30.0) (2020-10-22)
166
+
167
+ **Added**
168
+
169
+ - Provide headers on mgmt token fetch [\#543](https://github.com/auth0/node-auth0/pull/543) ([davidpatrick](https://github.com/davidpatrick))
170
+
171
+ **Changed**
172
+
173
+ - [SDK-1975] Use exponential backoff rather than rate limit headers [\#538](https://github.com/auth0/node-auth0/pull/538) ([adamjmcgrath](https://github.com/adamjmcgrath))
174
+
175
+ **Fixed**
176
+
177
+ - Bumps Rest-Facade Dependencies [\#542](https://github.com/auth0/node-auth0/pull/542) ([davidpatrick](https://github.com/davidpatrick))
178
+ - Fix deprecation warning in importUserJobs [\#537](https://github.com/auth0/node-auth0/pull/537) ([JCQuintas](https://github.com/JCQuintas))
179
+
180
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.29.0...v2.30.0)
181
+
182
+ ## [v2.29.0](https://github.com/auth0/node-auth0/tree/v2.29.0) (2020-09-23)
183
+
184
+ **Added**
185
+
186
+ - Adding support for prompts and custom texts [\#533](https://github.com/auth0/node-auth0/pull/533) ([davidpatrick](https://github.com/davidpatrick))
187
+ - Adding call to invalidate all remembered browsers. [\#528](https://github.com/auth0/node-auth0/pull/528) ([tandrup](https://github.com/tandrup))
188
+ - Adding docs for secondary and federated identity email verification [\#519](https://github.com/auth0/node-auth0/pull/519) ([jimmyjames](https://github.com/jimmyjames))
189
+
190
+ **Changed**
191
+
192
+ - Update dependencies [\#535](https://github.com/auth0/node-auth0/pull/535) ([davidpatrick](https://github.com/davidpatrick))
193
+ - Update jwks-rsa dependency to avoid DeprecationWarning Buffer() [\#534](https://github.com/auth0/node-auth0/pull/534) ([jalie](https://github.com/jalie))
194
+
195
+ **Security**
196
+
197
+ - [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))
198
+
199
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.28.0...v2.29.0)
200
+
201
+ ## [v2.28.0](https://github.com/auth0/node-auth0/tree/v2.28.0) (2020-08-27)
202
+
203
+ **Added**
204
+
205
+ - Added support for Log Streams [\#518](https://github.com/auth0/node-auth0/pull/518) ([cv711](https://github.com/cv711))
206
+
207
+ **Removed**
208
+
209
+ - Remove bluebird [\#520](https://github.com/auth0/node-auth0/pull/520) ([mattiasnixell](https://github.com/mattiasnixell))
210
+
211
+ **Security**
212
+
213
+ - [Security] Bump elliptic from 6.5.2 to 6.5.3 [\#521](https://github.com/auth0/node-auth0/pull/521) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
214
+
215
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.27.1...v2.28.0)
216
+
217
+ ## [v2.27.1](https://github.com/auth0/node-auth0/tree/v2.27.1) (2020-07-23)
218
+
219
+ **Changed**
220
+
221
+ - Use [REDACTED] instead of [SANITIZED] when cleaning errors [\#515](https://github.com/auth0/node-auth0/pull/515) ([jimmyjames](https://github.com/jimmyjames))
222
+
223
+ **Security**
224
+
225
+ - Sanitize Headers on Errors [\#507](https://github.com/auth0/node-auth0/pull/507) ([jimmyjames](https://github.com/jimmyjames))
226
+ - Bump lodash from 4.17.15 to 4.17.19 [\#506](https://github.com/auth0/node-auth0/pull/506) ([dependabot[bot]](https://github.com/apps/dependabot))
227
+
228
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.27.0...v2.27.1)
229
+
230
+ ## [v2.27.0](https://github.com/auth0/node-auth0/tree/v2.27.0) (2020-06-30)
231
+
232
+ **Added**
233
+
234
+ - feat(migrations): adds migrations manager [\#503](https://github.com/auth0/node-auth0/pull/503) ([CriGoT](https://github.com/CriGoT))
235
+ - Added deleteUserByEmail to ConnectionsManager [\#502](https://github.com/auth0/node-auth0/pull/502) ([MatthewBacalakis](https://github.com/MatthewBacalakis))
236
+ - feat(guardian): support policies, selected-provider, message-types methods [MFA-310][\#501](https://github.com/auth0/node-auth0/pull/501) ([pmalouin](https://github.com/pmalouin))
237
+
238
+ **Fixed**
239
+
240
+ - fix: management methods throwing error on access [\#500](https://github.com/auth0/node-auth0/pull/500) ([pmalouin](https://github.com/pmalouin))
241
+ - fix: guardian-related code examples [\#499](https://github.com/auth0/node-auth0/pull/499) ([pmalouin](https://github.com/pmalouin))
242
+
243
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.26.0...v2.27.0)
244
+
245
+ ## [v2.26.0](https://github.com/auth0/node-auth0/tree/v2.26.0) (2020-06-05)
246
+
247
+ **Added**
248
+
249
+ - JobsManager handling importUsers response payload [\#492](https://github.com/auth0/node-auth0/pull/492) ([davidpatrick](https://github.com/davidpatrick))
250
+
251
+ **Deprecated**
252
+
253
+ - Deprecate importUsers in favor of importUsersJob [\#494](https://github.com/auth0/node-auth0/pull/494) ([davidpatrick](https://github.com/davidpatrick))
254
+
255
+ **Fixed**
256
+
257
+ - Bump codecov - npm audit fix [\#495](https://github.com/auth0/node-auth0/pull/495) ([davidpatrick](https://github.com/davidpatrick))
258
+
259
+ **Security**
260
+
261
+ - Fixes dependency vulnerabilities from webpack [\#498](https://github.com/auth0/node-auth0/pull/498) ([davidpatrick](https://github.com/davidpatrick))
262
+
263
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.25.1...v2.26.0)
264
+
265
+ ## [v2.25.1](https://github.com/auth0/node-auth0/tree/v2.25.1) (2020-05-03)
266
+
267
+ **Fixed**
268
+
269
+ - Return response.data where Axios is used [\#484](https://github.com/auth0/node-auth0/pull/484) ([taylorbryant](https://github.com/taylorbryant))
270
+
271
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.25.0...v2.25.1)
272
+
273
+ ## [v2.25.0](https://github.com/auth0/node-auth0/tree/v2.25.0) (2020-04-29)
274
+
275
+ **Changed**
276
+
277
+ - Deprecate Request lib [\#475](https://github.com/auth0/node-auth0/pull/475) ([davidpatrick](https://github.com/davidpatrick))
278
+
279
+ **Fixed**
280
+
281
+ - Fix typos [\#480](https://github.com/auth0/node-auth0/pull/480) ([pgrimaud](https://github.com/pgrimaud))
282
+ - Update getRulesConfigs docs to include callback [\#473](https://github.com/auth0/node-auth0/pull/473) ([akvamalin](https://github.com/akvamalin))
283
+
284
+ **Security**
285
+
286
+ - Dependency bump [\#481](https://github.com/auth0/node-auth0/pull/481) ([davidpatrick](https://github.com/davidpatrick))
287
+ - [Security] Bump acorn from 6.2.1 to 6.4.1 [\#471](https://github.com/auth0/node-auth0/pull/471) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
288
+
289
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.24.0...v2.25.0)
290
+
291
+ ## [v2.24.0](https://github.com/auth0/node-auth0/tree/v2.24.0) (2020-03-06)
292
+
293
+ **Fixed**
294
+
295
+ - Update and fix JSDocs related to JobsManager [\#469](https://github.com/auth0/node-auth0/pull/469) ([orangain](https://github.com/orangain))
296
+ - Fixes test on supportedAlgorithms [\#466](https://github.com/auth0/node-auth0/pull/466) ([davidpatrick](https://github.com/davidpatrick))
297
+ - Fixes calls on passwordless endpoints [\#465](https://github.com/auth0/node-auth0/pull/465) ([davidpatrick](https://github.com/davidpatrick))
298
+
299
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.23.0...v2.24.0)
300
+
301
+ ## [v2.23.0](https://github.com/auth0/node-auth0/tree/v2.23.0) (2020-02-21)
302
+
303
+ **Added**
304
+
305
+ - [DXEX-455] Allow custom headers to be set in Management/Auth Clients. [\#460](https://github.com/auth0/node-auth0/pull/460) ([seejee](https://github.com/seejee))
306
+
307
+ **Changed**
308
+
309
+ - Updates node-jwks-rsa [\#461](https://github.com/auth0/node-auth0/pull/461) ([davidpatrick](https://github.com/davidpatrick))
310
+
311
+ **Fixed**
312
+
313
+ - Update lru-memoizer dependency to avoid DeprecationWarning Buffer() [\#459](https://github.com/auth0/node-auth0/pull/459) ([jalie](https://github.com/jalie))
314
+ - getUsersInRole Docs [\#457](https://github.com/auth0/node-auth0/pull/457) ([davidpatrick](https://github.com/davidpatrick))
315
+
316
+ **Security**
317
+
318
+ - [Security] Bump codecov from 3.5.0 to 3.6.5 [\#462](https://github.com/auth0/node-auth0/pull/462) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
319
+
320
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.22.0...v2.23.0)
321
+
322
+ ## [v2.22.0](https://github.com/auth0/node-auth0/tree/v2.22.0) (2020-01-24)
323
+
324
+ **Added**
325
+
326
+ - Support for Hooks API [\#440](https://github.com/auth0/node-auth0/pull/440) ([astanciu](https://github.com/astanciu))
327
+
328
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.21.0...v2.22.0)
329
+
330
+ ## [v2.21.0](https://github.com/auth0/node-auth0/tree/v2.21.0) (2020-01-15)
331
+
332
+ **Added**
333
+
334
+ - Improved OIDC compliance [\#446](https://github.com/auth0/node-auth0/pull/446) ([davidpatrick](https://github.com/davidpatrick))
335
+
336
+ **Changed**
337
+
338
+ - Add client secret to refreshToken and remove ID token validation [\#433](https://github.com/auth0/node-auth0/pull/433) ([joshcanhelp](https://github.com/joshcanhelp))
339
+
340
+ **Security**
341
+
342
+ - [Security] Bump handlebars from 4.1.2 to 4.5.3 [\#441](https://github.com/auth0/node-auth0/pull/441) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
343
+ - Update rest-facade dependency [\#436](https://github.com/auth0/node-auth0/pull/436) ([joshcanhelp](https://github.com/joshcanhelp))
344
+
345
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.20.0...v2.21.0)
346
+
347
+ ## [v2.20.0](https://github.com/auth0/node-auth0/tree/v2.20.0) (2019-09-17)
348
+
349
+ **Added**
350
+
351
+ - expose createEmailTemplate, getEmailTemplate, updateEmailTemplates vi… [\#416](https://github.com/auth0/node-auth0/pull/416) ([rameshanandakrishnan](https://github.com/rameshanandakrishnan))
352
+
353
+ **Security**
354
+
355
+ - Sanitize Error Request Data [\#424](https://github.com/auth0/node-auth0/pull/424) ([davidpatrick](https://github.com/davidpatrick))
356
+ - [Security] Bump mixin-deep from 1.3.1 to 1.3.2 [\#421](https://github.com/auth0/node-auth0/pull/421) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
357
+
358
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.19.0...v2.20.0)
359
+
360
+ ## [v2.18.1](https://github.com/auth0/node-auth0/tree/v2.19.0) (2019-08-08)
361
+
362
+ **Added**
363
+
364
+ - Implement auth0-forwarded-for header passing in Authentication Client [\#401](https://github.com/auth0/node-auth0/pull/401) ([kjarmicki](https://github.com/kjarmicki))
365
+
366
+ **Changed**
367
+
368
+ - Improve JobManager (get errors + parse error message when importing users) [\#407](https://github.com/auth0/node-auth0/pull/407) ([jbauth0](https://github.com/jbauth0))
369
+
370
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.18.1...v2.19.0)
371
+
372
+ ## [v2.18.0](https://github.com/auth0/node-auth0/tree/v2.18.1) (2019-07-23)
373
+
374
+ **Changed**
375
+
376
+ - Encode id param on GET [\#374](https://github.com/auth0/node-auth0/pull/374) ([luisrudge](https://github.com/luisrudge))
377
+
378
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.18.0...v2.18.1)
379
+
380
+ ## [v2.18.0](https://github.com/auth0/node-auth0/tree/v2.18.0) (2019-06-26)
381
+
382
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.17.1...v2.18.0)
383
+
384
+ **Added**
385
+
386
+ - Add Management API support for Branding and Prompts endpoints. [\#370](https://github.com/auth0/node-auth0/pull/370) ([chrisscott](https://github.com/chrisscott))
387
+
388
+ ## [v2.17.1](https://github.com/auth0/node-auth0/tree/v2.17.1) (2019-05-22)
389
+
390
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.17.0...v2.17.1)
391
+
392
+ **Fixed**
393
+
394
+ - Fix telemetry header [\#362](https://github.com/auth0/node-auth0/pull/362) ([lbalmaceda](https://github.com/lbalmaceda))
395
+
396
+ ## [v2.17.0](https://github.com/auth0/node-auth0/tree/v2.17.0) (2019-04-15)
397
+
398
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.16.0...v2.17.0)
399
+
400
+ **Added**
401
+
402
+ - Add method to assign users to a role [\#348](https://github.com/auth0/node-auth0/pull/348) ([pushpabrol](https://github.com/pushpabrol))
403
+ - Add support for roles and permissions [\#344](https://github.com/auth0/node-auth0/pull/344) ([pushpabrol](https://github.com/pushpabrol))
404
+
405
+ ## [v2.16.0](https://github.com/auth0/node-auth0/tree/v2.16.0) (2019-03-18)
406
+
407
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.15.0...v2.16.0)
408
+
409
+ **Added**
410
+
411
+ - Add support for Auth0 Grants [\#343](https://github.com/auth0/node-auth0/pull/343) ([jsmpereira](https://github.com/jsmpereira))
412
+
413
+ ## [v2.15.0](https://github.com/auth0/node-auth0/tree/v2.15.0) (2019-03-11)
414
+
415
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.14.0...v2.15.0)
416
+
417
+ **Added**
418
+
419
+ - Add users-exports endpoint [\#340](https://github.com/auth0/node-auth0/pull/340) ([arjenvanderende](https://github.com/arjenvanderende))
420
+
421
+ **Fixed**
422
+
423
+ - Don't validate id_token when alg is HS256 and there is no clientSecret [\#330](https://github.com/auth0/node-auth0/pull/330) ([luisrudge](https://github.com/luisrudge))
424
+
425
+ ## [v2.14.0](https://github.com/auth0/node-auth0/tree/v2.14.0) (2018-11-12)
426
+
427
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.13.0...v2.14.0)
428
+
429
+ **Added**
430
+
431
+ - Add method to refresh a token using a refresh_token [\#313](https://github.com/auth0/node-auth0/pull/313) ([modeswitch](https://github.com/modeswitch))
432
+ - Add all Guardian APIs [\#311](https://github.com/auth0/node-auth0/pull/311) ([stevezau](https://github.com/stevezau))
433
+ - Add Custom Domains methods [\#310](https://github.com/auth0/node-auth0/pull/310) ([stevezau](https://github.com/stevezau))
434
+ - Add send_completion_email and upsert params for importUsers [\#270](https://github.com/auth0/node-auth0/pull/270) ([Floppy](https://github.com/Floppy))
435
+
436
+ **Deprecated**
437
+
438
+ - Deprecate UsersManager.deleteAll and deleteAllUsers wrapper methods [\#309](https://github.com/auth0/node-auth0/pull/309) ([M-Zuber](https://github.com/M-Zuber))
439
+
440
+ ## [v2.13.0](https://github.com/auth0/node-auth0/tree/v2.13.0) (2018-09-28)
441
+
442
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.12.0...v2.13.0)
443
+
444
+ **Added**
445
+
446
+ - Add id_token validation (HS256 and RS256) [\#295](https://github.com/auth0/node-auth0/pull/295) ([luisrudge](https://github.com/luisrudge))
447
+
448
+ ## [v2.12.0](https://github.com/auth0/node-auth0/tree/v2.12.0) (2018-08-09)
449
+
450
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.11.0...v2.12.0)
451
+
452
+ **Added**
453
+
454
+ - Added authorizationCodeGrant method to OAuthAuthenticator [\#290](https://github.com/auth0/node-auth0/pull/290) ([cwurtz](https://github.com/cwurtz))
455
+ - Add Guardian Enrollments endpoints [\#278](https://github.com/auth0/node-auth0/pull/278) ([fmedinac](https://github.com/fmedinac))
456
+
457
+ ## [v2.11.0](https://github.com/auth0/node-auth0/tree/v2.11.0) (2018-07-25)
458
+
459
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.10.0...v2.11.0)
460
+
461
+ **Added**
462
+
463
+ - Added Pagination Docs for a Client Grants, Resouce Servers and Rules [\#282](https://github.com/auth0/node-auth0/pull/282) ([cocojoe](https://github.com/cocojoe))
464
+ - Added rules config methods [\#227](https://github.com/auth0/node-auth0/pull/227) ([dctoon](https://github.com/dctoon))
465
+
466
+ **Fixed**
467
+
468
+ - Get access token before importing users [\#267](https://github.com/auth0/node-auth0/pull/267) ([Floppy](https://github.com/Floppy))
469
+
470
+ ## [v2.10.0](https://github.com/auth0/node-auth0/tree/v2.10.0) (2018-05-29)
471
+
472
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.9.3...v2.10.0)
473
+
474
+ **Added**
475
+
476
+ - Adding pagination docs for clients/connections [\#268](https://github.com/auth0/node-auth0/pull/268) ([luisrudge](https://github.com/luisrudge))
477
+
478
+ **Fixed**
479
+
480
+ - Fix deleteUserMultifactor naming [\#259](https://github.com/auth0/node-auth0/pull/259) ([luisrudge](https://github.com/luisrudge))
481
+
482
+ ## [v2.9.3](https://github.com/auth0/node-auth0/tree/v2.9.3) (2018-03-01)
483
+
484
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.9.2...v2.9.3)
485
+
486
+ **Fixed**
487
+
488
+ - Add client secret to passwordGrant [\#217](https://github.com/auth0/node-auth0/pull/217) ([luisrudge](https://github.com/luisrudge))
489
+
490
+ ## [v2.9.2](https://github.com/auth0/node-auth0/tree/v2.9.2) (2018-01-16)
491
+
492
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.9.1...v2.9.2)
493
+
494
+ **Security**
495
+
496
+ - Update rest facade [\#232](https://github.com/auth0/node-auth0/pull/232) ([luisrudge](https://github.com/luisrudge))
497
+
498
+ ## [v2.9.1](https://github.com/auth0/node-auth0/tree/v2.9.1) (2017-12-08)
499
+
500
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.9.0...v2.9.1)
501
+
502
+ **Fixed**
503
+
504
+ - fixed missing data object error [\#224](https://github.com/auth0/node-auth0/pull/224) ([dctoon](https://github.com/dctoon))
505
+
506
+ ## [v2.9.0](https://github.com/auth0/node-auth0/tree/v2.9.0) (2017-12-07)
507
+
508
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.8.0...v2.9.0)
509
+
510
+ **Added**
511
+
512
+ - Added support for /users-by-email method. [\#218](https://github.com/auth0/node-auth0/pull/218) ([kopertop](https://github.com/kopertop))
513
+ - Add retry functionality for management api requests [\#215](https://github.com/auth0/node-auth0/pull/215) ([dctoon](https://github.com/dctoon))
514
+
515
+ ## [v2.8.0](https://github.com/auth0/node-auth0/tree/v2.8.0) (2017-09-30)
516
+
517
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.7.1...v2.8.0)
518
+
519
+ **Added**
520
+
521
+ - Added tokenProvider functionality [\#196](https://github.com/auth0/node-auth0/pull/196) ([dctoon](https://github.com/dctoon))
522
+
523
+ **Fixed**
524
+
525
+ - Fix wrapPropertyMethod mistake for updateClientGrant [\#202](https://github.com/auth0/node-auth0/pull/202) ([danedmunds](https://github.com/danedmunds))
526
+
527
+ ## [v2.7.1](https://github.com/auth0/node-auth0/tree/v2.7.1) (2017-09-30)
528
+
529
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.7.0...v2.7.1)
530
+
531
+ **Fixed**
532
+
533
+ - Fix auth/users.getInfo to return JSON (fixes #158) [\#192](https://github.com/auth0/node-auth0/pull/192) ([pilwon](https://github.com/pilwon))
534
+
535
+ **Security**
536
+
537
+ - Update request to address ReDoS vulnerability [\#206](https://github.com/auth0/node-auth0/pull/206) ([dancrumb](https://github.com/dancrumb))
538
+
539
+ ## [v2.7.0](https://github.com/auth0/node-auth0/tree/v2.7.0) (2017-06-28)
540
+
541
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.6.0...v2.7.0)
542
+
543
+ **Added**
544
+
545
+ - Add password grant method [\#189](https://github.com/auth0/node-auth0/pull/189) ([hzalaz](https://github.com/hzalaz))
546
+ - Retrieve a user's Guardian enrollments [\#181](https://github.com/auth0/node-auth0/pull/181) ([joshuaali](https://github.com/joshuaali))
547
+ - Add get user logs [\#176](https://github.com/auth0/node-auth0/pull/176) ([amiram](https://github.com/amiram))
548
+
549
+ **Changed**
550
+
551
+ - Update packages and utilize error classes from rest-facade correctly (Fixes #154) [\#183](https://github.com/auth0/node-auth0/pull/183) ([charsleysa](https://github.com/charsleysa))
552
+
553
+ **Fixed**
554
+
555
+ - Fix impersonation to send AT in the params. [\#190](https://github.com/auth0/node-auth0/pull/190) ([hzalaz](https://github.com/hzalaz))
556
+ - Fixed minor typo in DatabaseAuthenticator module [\#184](https://github.com/auth0/node-auth0/pull/184) ([scostello-paanalytics](https://github.com/scostello-paanalytics))
557
+ - fix: avoid possible prototype override protection bypass [\#170](https://github.com/auth0/node-auth0/pull/170) ([AlmaasAre](https://github.com/AlmaasAre))
package/README.md CHANGED
@@ -21,6 +21,10 @@ You can find this library documentation in this [page](https://auth0.github.io/n
21
21
 
22
22
  For more information about [auth0](https://auth0.com) check our [documentation page](https://auth0.com/docs).
23
23
 
24
+ ## Node version support
25
+
26
+ This SDK is tested on the latest Node versions 8, 10, 12 and 14.
27
+
24
28
  ## Authentication API Client
25
29
 
26
30
  This client must be used to access Auth0's [Authentication API](https://auth0.com/docs/api/authentication).
@@ -32,7 +36,7 @@ var AuthenticationClient = require('auth0').AuthenticationClient;
32
36
 
33
37
  var auth0 = new AuthenticationClient({
34
38
  domain: '{YOUR_ACCOUNT}.auth0.com',
35
- clientId: '{OPTIONAL_CLIENT_ID}'
39
+ clientId: '{OPTIONAL_CLIENT_ID}',
36
40
  });
37
41
  ```
38
42
 
@@ -47,7 +51,7 @@ var ManagementClient = require('auth0').ManagementClient;
47
51
 
48
52
  var management = new ManagementClient({
49
53
  token: '{YOUR_API_V2_TOKEN}',
50
- domain: '{YOUR_ACCOUNT}.auth0.com'
54
+ domain: '{YOUR_ACCOUNT}.auth0.com',
51
55
  });
52
56
  ```
53
57
 
@@ -62,7 +66,7 @@ var auth0 = new ManagementClient({
62
66
  domain: '{YOUR_ACCOUNT}.auth0.com',
63
67
  clientId: '{YOUR_NON_INTERACTIVE_CLIENT_ID}',
64
68
  clientSecret: '{YOUR_NON_INTERACTIVE_CLIENT_SECRET}',
65
- scope: 'read:users update:users'
69
+ scope: 'read:users update:users',
66
70
  });
67
71
  ```
68
72
 
@@ -76,15 +80,15 @@ var AuthenticationClient = require('auth0').AuthenticationClient;
76
80
  var auth0 = new AuthenticationClient({
77
81
  domain: '{YOUR_ACCOUNT}.auth0.com',
78
82
  clientId: '{CLIENT_ID}',
79
- clientSecret: '{CLIENT_SECRET}'
83
+ clientSecret: '{CLIENT_SECRET}',
80
84
  });
81
85
 
82
86
  auth0.clientCredentialsGrant(
83
87
  {
84
88
  audience: 'https://{YOUR_ACCOUNT}.auth0.com/api/v2/',
85
- scope: '{MANAGEMENT_API_SCOPES}'
89
+ scope: '{MANAGEMENT_API_SCOPES}',
86
90
  },
87
- function(err, response) {
91
+ function (err, response) {
88
92
  if (err) {
89
93
  // Handle error.
90
94
  }
@@ -101,7 +105,7 @@ Be aware that all methods can be used with promises or callbacks. However, when
101
105
 
102
106
  ```js
103
107
  // Using callbacks.
104
- management.getUsers(function(err, users) {
108
+ management.getUsers(function (err, users) {
105
109
  if (err) {
106
110
  // handle error.
107
111
  }
@@ -111,15 +115,34 @@ management.getUsers(function(err, users) {
111
115
  // Using promises.
112
116
  management
113
117
  .getUsers()
114
- .then(function(users) {
118
+ .then(function (users) {
115
119
  console.log(users);
116
120
  })
117
- .catch(function(err) {
121
+ .catch(function (err) {
118
122
  // Handle error.
119
123
  });
120
124
  ```
125
+
121
126
  ## Typescript
122
- The types for this library are currently maintained by the community at [Definitely Typed](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/auth0). The team is planning taking ownership of this library as discussed in https://github.com/auth0/node-auth0/issues/572. After the team has taken ownership we will remove this net from the Readme.
127
+
128
+ The types for this library are currently maintained by the community at [Definitely Typed](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/auth0). The team is planning taking ownership of this library as discussed in https://github.com/auth0/node-auth0/issues/572. After the team has taken ownership we will remove this net from the Readme.
129
+
130
+ ## Troubleshooting
131
+
132
+ ### Getting `Error: Can't resolve 'superagent-proxy'` when bundling with Webpack
133
+
134
+ We have a dependency on `rest-facade` which `require`s but doesn't include `superagent-proxy`. This SDK doesn't support proxies, so this dependency is not required. To workaround this you can add the following to your `webpack.config.js`:
135
+
136
+ ```
137
+ resolve: {
138
+ alias: {
139
+ 'superagent-proxy': false
140
+ }
141
+ }
142
+ ```
143
+
144
+ Or install `superagent-proxy` yourself.
145
+
123
146
 
124
147
  ## What is Auth0?
125
148
 
@@ -162,5 +185,4 @@ This project is licensed under the MIT license. See the [LICENSE](LICENSE) file
162
185
  [downloads-image]: https://img.shields.io/npm/dm/auth0.svg?style=flat-square
163
186
  [downloads-url]: https://npmjs.org/package/auth0
164
187
 
165
-
166
188
  [![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)