Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading node-auth0 from v3 to v4 #953

Merged
merged 102 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
82187a8
Upgrade auth0 to v4
frederikprijck Aug 30, 2023
d776f80
Update tests
frederikprijck Aug 30, 2023
1afff46
Ensure e2e tests run against a live tenant
frederikprijck Aug 31, 2023
0369f0e
Fix linter
frederikprijck Aug 31, 2023
dc33301
fix tests
frederikprijck Sep 5, 2023
d804c76
fix package-lock
adamjmcgrath Sep 6, 2023
9259c23
fix e2e tests
adamjmcgrath Sep 6, 2023
f568838
Ignore missing client overload error for now
adamjmcgrath Sep 7, 2023
395bb85
fix unit test
adamjmcgrath Sep 7, 2023
34d584c
update auth0: 4.7.0
kushalshit27 Jul 25, 2024
f209c95
update readme
kushalshit27 Jul 25, 2024
4e7e024
update readme
kushalshit27 Jul 25, 2024
87e0b0b
undo readme updates
kushalshit27 Jul 25, 2024
d26aa04
remove old param parameter from processChanges
kushalshit27 Jul 25, 2024
b5efb17
DELETE email provider deprecation
kushalshit27 Jul 29, 2024
917f824
refactor email template updatOrCreate reasponse
kushalshit27 Jul 31, 2024
aa45ea7
fix context test for invalid client secret
kushalshit27 Jul 31, 2024
4042d27
emailProvider test fix
kushalshit27 Aug 1, 2024
9d10814
attackProtection test fix: should update attack protection settings
kushalshit27 Aug 1, 2024
24d6296
auth0 version update 4.7.0 ->4.8.0
kushalshit27 Aug 5, 2024
c2f1a54
apply formatting to guardianFactorProviders.ts
kushalshit27 Aug 7, 2024
bdccebd
paginate through all roles for getAll roles
kushalshit27 Aug 7, 2024
b54b7a6
mockPagedData should retutn total if include_total is true
kushalshit27 Aug 7, 2024
a1cc33a
update: get-all paginate roles
kushalshit27 Aug 14, 2024
0112543
clientGrants pagination upadted
kushalshit27 Aug 19, 2024
62a5bfd
actions: get all pagination updated
kushalshit27 Aug 19, 2024
f591d7c
clientGrants and clients pagination update
kushalshit27 Aug 19, 2024
4b2914c
clients getType pagination update
kushalshit27 Aug 19, 2024
a99f86e
actions pagination and test updated
kushalshit27 Aug 19, 2024
923a262
update paginate for:
kushalshit27 Aug 19, 2024
4c5c877
update pagination for rules,resource servers,pages
kushalshit27 Aug 19, 2024
dd665a0
apply formatting to guardianFactorProviders.ts"
kushalshit27 Aug 22, 2024
fa1f3ac
Revert "apply formatting to guardianFactorProviders.ts""
kushalshit27 Aug 22, 2024
2d4963f
auth0 version update 4.8.0 ->4.9.0
kushalshit27 Aug 26, 2024
2d80978
replace BaseAuth0APIClient with Auth0APIClient
kushalshit27 Aug 26, 2024
b042045
update: pagePaginator
kushalshit27 Aug 26, 2024
517eb8e
paginate: client handlers
kushalshit27 Aug 26, 2024
956bed4
paginate helper funation, client getAll
kushalshit27 Aug 26, 2024
080b7a7
client handlers paginate with updated test
kushalshit27 Sep 5, 2024
56e0568
clientGrants directory handlers pagination
kushalshit27 Sep 5, 2024
3659484
actions handlers pagination
kushalshit27 Sep 5, 2024
cac2c40
cientGrants handlers pagination
kushalshit27 Sep 5, 2024
3087e10
cientGrants handlers clients pagination
kushalshit27 Sep 5, 2024
844bc13
connections handlers pagination
kushalshit27 Sep 5, 2024
7e3e6b1
database handlers pagination
kushalshit27 Sep 5, 2024
ebf6dc1
hooks handlers pagination
kushalshit27 Sep 6, 2024
72310a2
organization handlers pagination
kushalshit27 Sep 6, 2024
be1ad54
pages handlers pagination
kushalshit27 Sep 6, 2024
789c1fe
resourceServers handlers pagination
kushalshit27 Sep 6, 2024
f0437f3
roles handlers pagination
kushalshit27 Sep 6, 2024
cad4817
rules handlers pagination
kushalshit27 Sep 6, 2024
36a0d41
customDomain,logStream handlers comment addedfor not supported pagina…
kushalshit27 Sep 6, 2024
659ecd5
PR review changes 1
kushalshit27 Sep 18, 2024
a4b263d
PR review changes 2
kushalshit27 Sep 18, 2024
ac0c3ae
paginate function added types
kushalshit27 Sep 19, 2024
3bb4bbd
fix type errors for actions, branding
kushalshit27 Sep 19, 2024
3c5b674
npm pkg patch and minor version updated
kushalshit27 Sep 19, 2024
4779c61
Add type for fetchFunc.
kushalshit27 Sep 22, 2024
9942af4
Sync Migration to v4 with master (#957)
kushalshit27 Sep 25, 2024
5ccbebf
Re-recording tests and miscellaneous testing fixes (#859)
willvedd Oct 30, 2023
401cedc
Bump @babel/traverse from 7.18.11 to 7.23.2 (#857)
dependabot[bot] Nov 13, 2023
1474e53
Bump winston from 3.10.0 to 3.11.0 (#856)
dependabot[bot] Nov 13, 2023
87ac5b1
Bugfix/issue 875 (#876)
BavoLuysterborg Dec 22, 2023
690cf9a
Bump winston from 3.11.0 to 3.13.0 (#900)
dependabot[bot] Jun 21, 2024
22cb533
Bump braces from 3.0.2 to 3.0.3 (#907)
dependabot[bot] Jun 21, 2024
826ada8
Bump pretty-quick from 3.1.3 to 3.3.1 (#883)
dependabot[bot] Jun 21, 2024
1c35bd9
Bump chai from 4.3.7 to 4.4.1 (#881)
dependabot[bot] Jun 21, 2024
6415fc6
Add support for captcha_widget_theme property in colors within themes…
developerkunal Jun 21, 2024
4b86044
fix make `captcha_widget_theme` non-mandatory field in `colors` prope…
developerkunal Jun 24, 2024
d394490
Supporting SCIM feature | Workaround on node-auth0@v3 (#921)
nandan-bhat Jul 16, 2024
fb3e679
Adding fixes for permission errors (403) (#925)
nandan-bhat Jul 19, 2024
891b332
Bump chai from 4.4.1 to 4.5.0 (#932)
dependabot[bot] Jul 29, 2024
c28b94f
Add Support for Custom Prompts (#930)
developerkunal Aug 1, 2024
6ab933b
Improvement and fix delay issue in Scim Handler (#933)
nandan-bhat Aug 2, 2024
1bb4781
Fix DB Connections Flexible Identifiers not working with `requires_us…
developerkunal Aug 9, 2024
72a6806
Update branding template path. (#939)
kushalshit27 Aug 9, 2024
d5ab959
Fix branding template body path parsing issue (#943)
kushalshit27 Aug 28, 2024
0940d24
npm audit fix dependencies
kushalshit27 Sep 25, 2024
12917ae
fix build types
kushalshit27 Sep 26, 2024
0575d52
lint fix
kushalshit27 Sep 26, 2024
9ab003a
Merge branch 'master' into migration-to-v4
kushalshit27 Sep 26, 2024
679165e
fix e2e test
kushalshit27 Sep 26, 2024
6a93ff1
Update docs/excluding-from-management.md
kushalshit27 Oct 3, 2024
13de5cc
update e2e recording
kushalshit27 Oct 9, 2024
b0e28ab
Merge branch 'master' into migration-to-v4
kushalshit27 Oct 14, 2024
6ffe65a
Merge branch 'master' into migration-to-v4
kushalshit27 Oct 14, 2024
bb373d9
Merge branch 'master' into migration-to-v4
kushalshit27 Oct 15, 2024
6df3560
Merge branch 'migration-to-v4' of github.com:auth0/auth0-deploy-cli i…
kushalshit27 Oct 15, 2024
cb03db2
update e2e recordings
kushalshit27 Oct 15, 2024
30ab924
added back rule and hooks
kushalshit27 Oct 16, 2024
74214c2
added back tests for rule and hooks
kushalshit27 Oct 16, 2024
4b76fb8
update e2e recordings
kushalshit27 Oct 16, 2024
2e4b771
Merge branch 'master' into migration-to-v4
kushalshit27 Oct 16, 2024
fe52cdc
npm format
kushalshit27 Oct 16, 2024
482474f
npm lint fix
kushalshit27 Oct 16, 2024
34512cb
engines required node version added
kushalshit27 Oct 17, 2024
e7bafcb
V8 Migration Guide
kushalshit27 Oct 17, 2024
f10a951
npm pkg updated
kushalshit27 Oct 18, 2024
97b17b7
default log logic update
kushalshit27 Oct 18, 2024
d65f255
e2e recordings updated
kushalshit27 Oct 18, 2024
9be1415
V8 Migration doc updated
kushalshit27 Oct 18, 2024
262b582
V8 Migration doc updated
kushalshit27 Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Commits

All commits should be signed to enhance security, authorship, trust and compliance.

[About commit signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
Expand Down
2 changes: 1 addition & 1 deletion docs/configuring-the-deploy-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ String. Separate value from audience value while retrieving an access token for

### `AUTH0_EXCLUDED_RULES`

Array of strings. Excludes the management of specific rules by name. **Note:** This configuration may be subject to deprecation in the future. See: [excluding resources from management](excluding-from-management.md).
Array of strings. Excludes the management of specific rules by ID. **Note:** This configuration may be subject to deprecation in the future. See: [excluding resources from management](excluding-from-management.md).

### `AUTH0_EXCLUDED_CLIENTS`

Expand Down
1 change: 0 additions & 1 deletion docs/excluding-from-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ For non-set-based resource configuration like tenant, email provider and brandin
#### Example of emptiness

```yaml
hooks: [] # Empty hooks
connections: [] # Empty connections
tenant: {} # Effectively a no-op, cannot delete tenant
emailProvider: {} # Will delete email provider
Expand Down
19 changes: 11 additions & 8 deletions docs/resource-specific-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ Folder structure when in YAML mode.

./databases/
/Username-Password-Authentication
/change_password.js
/create.js
/delete.js
/get_user.js
/login.js
/verify.js
/change_password.js
/create.js
/delete.js
/get_user.js
/login.js
/verify.js
./tenant.yaml
```

Expand Down Expand Up @@ -98,8 +98,8 @@ Folder structure when in directory mode.
./verify.js
```


Contents of `database.json`

```json
{
"options": {
Expand Down Expand Up @@ -169,8 +169,8 @@ Folder structure when in directory mode.
./password_reset.json
```


Contents of `login.json`

```json
{
"name": "login",
Expand All @@ -180,6 +180,7 @@ Contents of `login.json`
```

Contents of `error_page.json`

```json
{
"html": "./error_page.html",
Expand All @@ -190,6 +191,7 @@ Contents of `error_page.json`
```

Contents of `guardian_multifactor.json`

```json
{
"enabled": true,
Expand All @@ -199,6 +201,7 @@ Contents of `guardian_multifactor.json`
```

Contents of `password_reset.json`

```json
{
"enabled": true,
Expand Down
46 changes: 46 additions & 0 deletions docs/v8_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# V8 Migration Guide

Guide to migrating from `7.x` to `8.x`

- [General](#general)
- [Node 18 or newer is required](#node-18-or-newer-is-required)
- [Auth0 V4 Migration Guide](https://github.com/auth0/node-auth0/blob/master/v4_MIGRATION_GUIDE.md)
- [Management Resources](#management-resources)
- [EmailProvider](#emailProvider)
- [Migrations](#migrations)

## General

### Node 18 or newer is required

Node 18 LTS and newer LTS releases are supported.

## Management Resources

| Resource | Change | Description |
|---------------|------------------|-----------------------------------------------|
| emailProvider | delete operation | Delete operation is deprecated on auth0 `4.x` |
| migrations | removed support | Not supported on auth0 `4.x` |

#### Note: Other resources from `7.x` are not affected and no changes are required.

#### emailProvider

The `delete` operation on the `emailProvider` resource will disable the email provider instead of deleting it.
This is because the email provider deletion operation is deprecated on auth0 `4.x`. User can disable the email provider
by email provider setting the `enabled` property to `false` from the configuration file.

```yaml
emailProvider:
# other properties
enabled: false
```

Rest of the operations on emailProvider resource will work the same as `7.x`.

#### migrations

The `migrations` resource is not supported on auth0 `4.x`. It's recommended to remove the `migrations` resource from the
configuration file. If it's not removed, the deploy CLI will ignore the `migrations` resource for operations.


7 changes: 0 additions & 7 deletions examples/directory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ repository =>
resource-servers
resource_server1.json
resource_server2.json
rules
rule1.js
rule1.json
rule2.js
rules-configs
env_param1.json
some_secret1.json
guardian
factors
sms.json
Expand Down
6 changes: 3 additions & 3 deletions examples/directory/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"ENV": "DEV"
},
"AUTH0_ALLOW_DELETE": false,
"INCLUDED_PROPS": {
"clients": [ "client_secret" ]
},
"AUTH0_EXCLUDED_RULES": [
"rule-1-name",
"rule-2-name"
],
"INCLUDED_PROPS": {
"clients": [ "client_secret" ]
},
"EXCLUDED_PROPS": {
"connections": [ "options.client_secret" ]
}
Expand Down
8 changes: 4 additions & 4 deletions examples/yaml/config.json.example
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"AUTH0_DOMAIN": "<YOUR_TENANT>.<YOUR_REGION>.auth0.com",
"AUTH0_DOMAIN": "<YOUR_TENANT>.<YOUR_REGION>.auth0.com",
"AUTH0_CLIENT_ID": "<client_id>",
"AUTH0_CLIENT_SECRET": "<client_secret>",
"AUTH0_KEYWORD_REPLACE_MAPPINGS": {
"AUTH0_TENANT_NAME": "<NAME>",
"ENV": "DEV"
},
"AUTH0_ALLOW_DELETE": false,
"INCLUDED_PROPS": {
"clients": [ "client_secret" ]
},
"AUTH0_EXCLUDED_RULES": [
"rule-1-name",
"rule-2-name"
],
"INCLUDED_PROPS": {
"clients": [ "client_secret" ]
},
"EXCLUDED_PROPS": {
"connections": [ "options.client_secret" ]
}
Expand Down
21 changes: 0 additions & 21 deletions examples/yaml/tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,6 @@ connections:
# Add other connection settings (https://auth0.com/docs/api/management/v2#!/Connections/post_connections)


rules:
- name: "Common-Functions"
order: 10
script: "rules/enrich_tokens.js"

rulesConfigs:
# Key/Value pairs for Rule configuration settings
- key: "SOME_SECRET"
value: 'some_key'

hooks:
- name: "Client Credentials Exchange"
triggerId: "credentials-exchange"
enabled: true
secrets:
api-key: "my custom api key"
dependencies:
bcrypt: "3.0.6"
script: "hooks/client-credentials-exchange.js"


resourceServers:
-
name: "My API"
Expand Down
Loading
Loading