auth0-lock 12.3.0 → 12.4.0

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 (127) hide show
  1. package/.github/actions/get-prerelease/action.yml +30 -0
  2. package/.github/actions/get-release-notes/action.yml +42 -0
  3. package/.github/actions/get-version/action.yml +21 -0
  4. package/.github/actions/npm-publish/action.yml +53 -0
  5. package/.github/actions/release-create/action.yml +47 -0
  6. package/.github/actions/tag-exists/action.yml +36 -0
  7. package/.github/dependabot.yml +5 -0
  8. package/.github/workflows/codeql.yml +3 -3
  9. package/.github/workflows/npm-release.yml +83 -0
  10. package/.github/workflows/release.yml +25 -0
  11. package/.github/workflows/snyk.yml +1 -1
  12. package/.github/workflows/test.yml +8 -8
  13. package/.shiprc +3 -2
  14. package/.version +1 -0
  15. package/CHANGELOG.md +15 -0
  16. package/DEVELOPMENT.md +8 -8
  17. package/Makefile +4 -4
  18. package/lib/CSSCore.js +0 -1
  19. package/lib/__tests__/connection/database/actions.js +2 -3
  20. package/lib/__tests__/connection/database/index.js +2 -2
  21. package/lib/__tests__/connection/enterprise/actions.js +2 -2
  22. package/lib/__tests__/connection/enterprise/hrd_pane.js +2 -2
  23. package/lib/__tests__/connection/enterprise/hrd_screen.js +2 -2
  24. package/lib/__tests__/connection/passwordless/ask_vcode.js +2 -2
  25. package/lib/__tests__/core/actions.js +4 -4
  26. package/lib/__tests__/core/remote_data.js +2 -2
  27. package/lib/__tests__/core/sso/last_login_screen.js +2 -2
  28. package/lib/__tests__/core/tenant.js +2 -2
  29. package/lib/__tests__/core/web_api.js +2 -2
  30. package/lib/__tests__/engine/classic.js +2 -2
  31. package/lib/__tests__/field/captcha/auth0_v2.js +28 -0
  32. package/lib/__tests__/field/captcha/third_party_captcha.js +261 -0
  33. package/lib/__tests__/field/captcha.js +22 -0
  34. package/lib/__tests__/field/field.js +2 -2
  35. package/lib/__tests__/i18n.js +2 -2
  36. package/lib/__tests__/testUtils.js +2 -2
  37. package/lib/__tests__/ui/box/chrome.js +2 -2
  38. package/lib/avatar.js +2 -2
  39. package/lib/connection/captcha.js +3 -3
  40. package/lib/connection/database/actions.js +2 -2
  41. package/lib/connection/database/index.js +2 -2
  42. package/lib/connection/database/login_pane.js +4 -4
  43. package/lib/connection/database/login_sign_up_tabs.js +4 -4
  44. package/lib/connection/database/mfa_pane.js +2 -2
  45. package/lib/connection/database/password_reset_confirmation.js +4 -4
  46. package/lib/connection/database/reset_password.js +4 -4
  47. package/lib/connection/database/reset_password_pane.js +4 -4
  48. package/lib/connection/database/signed_up_confirmation.js +4 -4
  49. package/lib/connection/enterprise/actions.js +4 -4
  50. package/lib/connection/enterprise/hrd_pane.js +4 -4
  51. package/lib/connection/enterprise/hrd_screen.js +4 -4
  52. package/lib/connection/enterprise/kerberos_screen.js +4 -4
  53. package/lib/connection/enterprise/quick_auth_screen.js +4 -4
  54. package/lib/connection/enterprise.js +2 -2
  55. package/lib/connection/passwordless/actions.js +5 -5
  56. package/lib/connection/passwordless/ask_vcode.js +2 -2
  57. package/lib/connection/passwordless/email_sent_confirmation.js +4 -4
  58. package/lib/connection/passwordless/index.js +2 -2
  59. package/lib/connection/social/index.js +2 -2
  60. package/lib/core/actions.js +4 -4
  61. package/lib/core/client/index.js +4 -5
  62. package/lib/core/client/settings.js +2 -2
  63. package/lib/core/error_screen.js +4 -4
  64. package/lib/core/index.js +3 -3
  65. package/lib/core/loading_screen.js +4 -4
  66. package/lib/core/remote_data.js +2 -2
  67. package/lib/core/screen.js +4 -4
  68. package/lib/core/signed_in_confirmation.js +4 -4
  69. package/lib/core/sso/last_login_screen.js +4 -4
  70. package/lib/core/tenant/index.js +4 -5
  71. package/lib/core/tenant/settings.js +2 -2
  72. package/lib/core/web_api/helper.js +5 -6
  73. package/lib/core/web_api/p2_api.js +4 -6
  74. package/lib/core/web_api.js +2 -2
  75. package/lib/core.js +5 -5
  76. package/lib/engine/classic/login.js +4 -4
  77. package/lib/engine/classic/mfa_login_screen.js +4 -4
  78. package/lib/engine/classic/sign_up_pane.js +4 -4
  79. package/lib/engine/classic/sign_up_screen.js +4 -4
  80. package/lib/engine/classic.js +4 -4
  81. package/lib/engine/passwordless/social_or_email_login_screen.js +4 -4
  82. package/lib/engine/passwordless/social_or_phone_number_login_screen.js +4 -4
  83. package/lib/engine/passwordless.js +4 -4
  84. package/lib/field/captcha/captcha_pane.js +4 -4
  85. package/lib/field/captcha/third_party_captcha.js +72 -30
  86. package/lib/field/custom_input.js +2 -2
  87. package/lib/field/email/email_pane.js +4 -4
  88. package/lib/field/email.js +2 -2
  89. package/lib/field/index.js +2 -2
  90. package/lib/field/mfa-code/mfa_code_pane.js +4 -4
  91. package/lib/field/password/password_pane.js +4 -4
  92. package/lib/field/phone-number/phone_number_pane.js +4 -4
  93. package/lib/field/social/event.js +2 -2
  94. package/lib/field/social/social_buttons_pane.js +4 -4
  95. package/lib/field/username/username_pane.js +4 -4
  96. package/lib/field/vcode/vcode_pane.js +4 -4
  97. package/lib/i18n.js +3 -3
  98. package/lib/lock.js +5 -5
  99. package/lib/passwordless.js +5 -5
  100. package/lib/quick-auth/actions.js +4 -4
  101. package/lib/sync.js +2 -2
  102. package/lib/ui/box/chrome.js +4 -4
  103. package/lib/ui/box/confirmation_pane.js +2 -2
  104. package/lib/ui/box/container.js +4 -4
  105. package/lib/ui/box/global_message.js +2 -2
  106. package/lib/ui/box/header.js +2 -2
  107. package/lib/ui/box/multisize_slide.js +2 -2
  108. package/lib/ui/box.js +2 -2
  109. package/lib/ui/input/captcha_input.js +2 -2
  110. package/lib/ui/input/checkbox_input.js +2 -2
  111. package/lib/ui/input/email_input.js +2 -2
  112. package/lib/ui/input/input_wrap.js +2 -2
  113. package/lib/ui/input/location_input.js +2 -2
  114. package/lib/ui/input/mfa_code_input.js +2 -2
  115. package/lib/ui/input/password/password_strength.js +2 -2
  116. package/lib/ui/input/password_input.js +4 -4
  117. package/lib/ui/input/phone_number_input.js +2 -2
  118. package/lib/ui/input/select_input.js +2 -2
  119. package/lib/ui/input/text_input.js +2 -2
  120. package/lib/ui/input/username_input.js +2 -2
  121. package/lib/ui/input/vcode_input.js +2 -2
  122. package/lib/ui/list.js +4 -4
  123. package/lib/utils/atom.js +2 -2
  124. package/lib/utils/cache.js +2 -2
  125. package/lib/utils/jsonp_utils.js +2 -2
  126. package/package.json +4 -3
  127. package/.github/workflows/publish.yml +0 -121
@@ -0,0 +1,30 @@
1
+ name: Return a boolean indicating if the version contains prerelease identifiers
2
+
3
+ #
4
+ # Returns a simple true/false boolean indicating whether the version indicates it's a prerelease or not.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+
9
+ inputs:
10
+ version:
11
+ required: true
12
+
13
+ outputs:
14
+ prerelease:
15
+ value: ${{ steps.get_prerelease.outputs.PRERELEASE }}
16
+
17
+ runs:
18
+ using: composite
19
+
20
+ steps:
21
+ - id: get_prerelease
22
+ shell: bash
23
+ run: |
24
+ if [[ "${VERSION}" == *"beta"* || "${VERSION}" == *"alpha"* ]]; then
25
+ echo "PRERELEASE=true" >> $GITHUB_OUTPUT
26
+ else
27
+ echo "PRERELEASE=false" >> $GITHUB_OUTPUT
28
+ fi
29
+ env:
30
+ VERSION: ${{ inputs.version }}
@@ -0,0 +1,42 @@
1
+ name: Return the release notes extracted from the body of the PR associated with the release.
2
+
3
+ #
4
+ # Returns the release notes from the content of a pull request linked to a release branch. It expects the branch name to be in the format release/vX.Y.Z, release/X.Y.Z, release/vX.Y.Z-beta.N. etc.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+ inputs:
9
+ version:
10
+ required: true
11
+ repo_name:
12
+ required: false
13
+ repo_owner:
14
+ required: true
15
+ token:
16
+ required: true
17
+
18
+ outputs:
19
+ release-notes:
20
+ value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }}
21
+
22
+ runs:
23
+ using: composite
24
+
25
+ steps:
26
+ - uses: actions/github-script@v7
27
+ id: get_release_notes
28
+ with:
29
+ result-encoding: string
30
+ script: |
31
+ const { data: pulls } = await github.rest.pulls.list({
32
+ owner: process.env.REPO_OWNER,
33
+ repo: process.env.REPO_NAME,
34
+ state: 'all',
35
+ head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`,
36
+ });
37
+ core.setOutput('RELEASE_NOTES', pulls[0].body);
38
+ env:
39
+ GITHUB_TOKEN: ${{ inputs.token }}
40
+ REPO_OWNER: ${{ inputs.repo_owner }}
41
+ REPO_NAME: ${{ inputs.repo_name }}
42
+ VERSION: ${{ inputs.version }}
@@ -0,0 +1,21 @@
1
+ name: Return the version extracted from the branch name
2
+
3
+ #
4
+ # Returns the version from the .version file.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+
9
+ outputs:
10
+ version:
11
+ value: ${{ steps.get_version.outputs.VERSION }}
12
+
13
+ runs:
14
+ using: composite
15
+
16
+ steps:
17
+ - id: get_version
18
+ shell: bash
19
+ run: |
20
+ VERSION=$(head -1 .version)
21
+ echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
@@ -0,0 +1,53 @@
1
+ name: Publish release to npm
2
+
3
+ inputs:
4
+ node-version:
5
+ required: true
6
+ npm-token:
7
+ required: true
8
+ version:
9
+ required: true
10
+ require-build:
11
+ default: true
12
+ release-directory:
13
+ default: './'
14
+
15
+ runs:
16
+ using: composite
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Setup Node
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: ${{ inputs.node-version }}
26
+ cache: 'npm'
27
+ registry-url: 'https://registry.npmjs.org'
28
+
29
+ - name: Install dependencies
30
+ if: inputs.require-build == 'true'
31
+ shell: bash
32
+ run: npm ci --include=dev
33
+
34
+ - name: Build package
35
+ if: inputs.require-build == 'true'
36
+ shell: bash
37
+ run: npm run build
38
+
39
+ - name: Publish release to NPM
40
+ shell: bash
41
+ working-directory: ${{ inputs.release-directory }}
42
+ run: |
43
+ if [[ "${VERSION}" == *"beta"* ]]; then
44
+ TAG="beta"
45
+ elif [[ "${VERSION}" == *"alpha"* ]]; then
46
+ TAG="alpha"
47
+ else
48
+ TAG="latest"
49
+ fi
50
+ npm publish --provenance --tag $TAG
51
+ env:
52
+ NODE_AUTH_TOKEN: ${{ inputs.npm-token }}
53
+ VERSION: ${{ inputs.version }}
@@ -0,0 +1,47 @@
1
+ name: Create a GitHub release
2
+
3
+ #
4
+ # Creates a GitHub release with the given version.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+
9
+ inputs:
10
+ token:
11
+ required: true
12
+ files:
13
+ required: false
14
+ name:
15
+ required: true
16
+ body:
17
+ required: true
18
+ tag:
19
+ required: true
20
+ commit:
21
+ required: true
22
+ draft:
23
+ default: false
24
+ required: false
25
+ prerelease:
26
+ default: false
27
+ required: false
28
+ fail_on_unmatched_files:
29
+ default: true
30
+ required: false
31
+
32
+ runs:
33
+ using: composite
34
+
35
+ steps:
36
+ - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
37
+ with:
38
+ body: ${{ inputs.body }}
39
+ name: ${{ inputs.name }}
40
+ tag_name: ${{ inputs.tag }}
41
+ target_commitish: ${{ inputs.commit }}
42
+ draft: ${{ inputs.draft }}
43
+ prerelease: ${{ inputs.prerelease }}
44
+ fail_on_unmatched_files: ${{ inputs.fail_on_unmatched_files }}
45
+ files: ${{ inputs.files }}
46
+ env:
47
+ GITHUB_TOKEN: ${{ inputs.token }}
@@ -0,0 +1,36 @@
1
+ name: Return a boolean indicating if a tag already exists for the repository
2
+
3
+ #
4
+ # Returns a simple true/false boolean indicating whether the tag exists or not.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+
9
+ inputs:
10
+ token:
11
+ required: true
12
+ tag:
13
+ required: true
14
+
15
+ outputs:
16
+ exists:
17
+ description: 'Whether the tag exists or not'
18
+ value: ${{ steps.tag-exists.outputs.EXISTS }}
19
+
20
+ runs:
21
+ using: composite
22
+
23
+ steps:
24
+ - id: tag-exists
25
+ shell: bash
26
+ run: |
27
+ GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}"
28
+ http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s -H "Authorization: token ${GITHUB_TOKEN}")
29
+ if [ "$http_status_code" -ne "404" ] ; then
30
+ echo "EXISTS=true" >> $GITHUB_OUTPUT
31
+ else
32
+ echo "EXISTS=false" >> $GITHUB_OUTPUT
33
+ fi
34
+ env:
35
+ TAG_NAME: ${{ inputs.tag }}
36
+ GITHUB_TOKEN: ${{ inputs.token }}
@@ -11,3 +11,8 @@ updates:
11
11
  ignore:
12
12
  - dependency-name: "*"
13
13
  update-types: ["version-update:semver-major"]
14
+ groups:
15
+ babel:
16
+ patterns:
17
+ - "@babel*"
18
+ - "babel-*"
@@ -40,15 +40,15 @@ jobs:
40
40
  uses: actions/checkout@v4
41
41
 
42
42
  - name: Initialize CodeQL
43
- uses: github/codeql-action/init@v2
43
+ uses: github/codeql-action/init@v3
44
44
  with:
45
45
  languages: ${{ matrix.language }}
46
46
  queries: +security-and-quality
47
47
 
48
48
  - name: Autobuild
49
- uses: github/codeql-action/autobuild@v2
49
+ uses: github/codeql-action/autobuild@v3
50
50
 
51
51
  - name: Perform CodeQL Analysis
52
- uses: github/codeql-action/analyze@v2
52
+ uses: github/codeql-action/analyze@v3
53
53
  with:
54
54
  category: '/language:${{ matrix.language }}'
@@ -0,0 +1,83 @@
1
+ name: Create npm and GitHub Release
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ node-version:
7
+ required: true
8
+ type: string
9
+ require-build:
10
+ default: true
11
+ type: string
12
+ release-directory:
13
+ default: './'
14
+ type: string
15
+ secrets:
16
+ github-token:
17
+ required: true
18
+ npm-token:
19
+ required: true
20
+
21
+ ### TODO: Replace instances of './.github/actions/' w/ `auth0/dx-sdk-actions/` and append `@latest` after the common `dx-sdk-actions` repo is made public.
22
+ ### TODO: Also remove `get-prerelease`, `get-version`, `release-create`, `tag-create` and `tag-exists` actions from this repo's .github/actions folder once the repo is public.
23
+
24
+ jobs:
25
+ release:
26
+ if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
27
+ runs-on: ubuntu-latest
28
+ environment: release
29
+
30
+ steps:
31
+ # Checkout the code
32
+ - uses: actions/checkout@v4
33
+ with:
34
+ fetch-depth: 0
35
+
36
+ # Get the version from the branch name
37
+ - id: get_version
38
+ uses: ./.github/actions/get-version
39
+
40
+ # Get the prerelease flag from the branch name
41
+ - id: get_prerelease
42
+ uses: ./.github/actions/get-prerelease
43
+ with:
44
+ version: ${{ steps.get_version.outputs.version }}
45
+
46
+ # Get the release notes
47
+ - id: get_release_notes
48
+ uses: ./.github/actions/get-release-notes
49
+ with:
50
+ token: ${{ secrets.github-token }}
51
+ version: ${{ steps.get_version.outputs.version }}
52
+ repo_owner: ${{ github.repository_owner }}
53
+ repo_name: ${{ github.event.repository.name }}
54
+
55
+ # Check if the tag already exists
56
+ - id: tag_exists
57
+ uses: ./.github/actions/tag-exists
58
+ with:
59
+ tag: ${{ steps.get_version.outputs.version }}
60
+ token: ${{ secrets.github-token }}
61
+
62
+ # If the tag already exists, exit with an error
63
+ - if: steps.tag_exists.outputs.exists == 'true'
64
+ run: exit 1
65
+
66
+ # Publish the release to npm
67
+ - uses: ./.github/actions/npm-publish
68
+ with:
69
+ node-version: ${{ inputs.node-version }}
70
+ require-build: ${{ inputs.require-build }}
71
+ release-directory: ${{ inputs.release-directory }}
72
+ version: ${{ steps.get_version.outputs.version }}
73
+ npm-token: ${{ secrets.npm-token }}
74
+
75
+ # Create a release for the tag
76
+ - uses: ./.github/actions/release-create
77
+ with:
78
+ token: ${{ secrets.github-token }}
79
+ name: ${{ steps.get_version.outputs.version }}
80
+ body: ${{ steps.get_release_notes.outputs.release-notes }}
81
+ tag: ${{ steps.get_version.outputs.version }}
82
+ commit: ${{ github.sha }}
83
+ prerelease: ${{ steps.get_prerelease.outputs.prerelease }}
@@ -0,0 +1,25 @@
1
+ name: Create GitHub Release
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - closed
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+ id-token: write # For publishing to npm using --provenance
12
+
13
+ ### TODO: Replace instances of './.github/workflows/' w/ `auth0/dx-sdk-actions/workflows/` and append `@latest` after the common `dx-sdk-actions` repo is made public.
14
+ ### TODO: Also remove `get-prerelease`, `get-release-notes`, `get-version`, `npm-publish`, `release-create`, and `tag-exists` actions from this repo's .github/actions folder once the repo is public.
15
+ ### TODO: Also remove `npm-release` workflow from this repo's .github/workflows folder once the repo is public.
16
+
17
+ jobs:
18
+ release:
19
+ uses: ./.github/workflows/npm-release.yml
20
+ with:
21
+ node-version: 18
22
+ require-build: true
23
+ secrets:
24
+ npm-token: ${{ secrets.NPM_TOKEN }}
25
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -42,6 +42,6 @@ jobs:
42
42
  with:
43
43
  ref: ${{ github.event.pull_request.head.sha || github.ref }}
44
44
 
45
- - uses: snyk/actions/php@b98d498629f1c368650224d6d212bf7dfa89e4bf # pin@0.4.0
45
+ - uses: snyk/actions/node@b98d498629f1c368650224d6d212bf7dfa89e4bf # pin@0.4.0
46
46
  env:
47
47
  SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
@@ -31,28 +31,28 @@ jobs:
31
31
  ref: ${{ github.event.pull_request.head.sha || github.ref }}
32
32
 
33
33
  - name: Setup Node
34
- uses: actions/setup-node@v3
34
+ uses: actions/setup-node@v4
35
35
  with:
36
36
  node-version: 18
37
- cache: 'yarn'
37
+ cache: 'npm'
38
38
 
39
39
  - name: Install dependencies
40
- run: yarn
40
+ run: npm ci
41
41
 
42
42
  - name: Build package
43
- run: yarn build
43
+ run: npm run build
44
44
 
45
45
  - name: Run `es-check`
46
- run: yarn test:es-check
46
+ run: npm run test:es-check
47
47
 
48
48
  - name: Run `i18n:validate`
49
- run: yarn i18n:validate
49
+ run: npm run i18n:validate
50
50
 
51
51
  - name: Run Jest unit tests
52
- run: yarn test
52
+ run: npm run test
53
53
 
54
54
  - name: Run Karma end-to-end tests
55
- run: yarn test:e2e
55
+ run: npm run test:e2e
56
56
 
57
57
  - name: Upload coverage
58
58
  uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@3.1.4
package/.shiprc CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "files": {
3
- "README.md": []
3
+ "README.md": [],
4
+ ".version": []
4
5
  },
5
- "postbump": "yarn dist build"
6
+ "postbump": "npm run build"
6
7
  }
package/.version ADDED
@@ -0,0 +1 @@
1
+ v12.4.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## [v12.4.0](https://github.com/auth0/lock/tree/v12.4.0) (2024-01-04)
4
+ [Full Changelog](https://github.com/auth0/lock/compare/v12.3.1...v12.4.0)
5
+
6
+ **Added**
7
+ - [IAMRISK-2916] Added support for Auth0 v2 captcha provider [\#2503](https://github.com/auth0/lock/pull/2503) ([alexkoumarianos-okta](https://github.com/alexkoumarianos-okta))
8
+
9
+ **Changed**
10
+ - [IAMRISK-3010] Added support for auth0_v2 captcha failOpen [\#2507](https://github.com/auth0/lock/pull/2507) ([alexkoumarianos-okta](https://github.com/alexkoumarianos-okta))
11
+
12
+ ## [v12.3.1](https://github.com/auth0/lock/tree/v12.3.1) (2023-11-13)
13
+ [Full Changelog](https://github.com/auth0/lock/compare/v12.3.0...v12.3.1)
14
+
15
+ **Security**
16
+ - Bump auth0-js to solve crypto-js vulnerability [\#2492](https://github.com/auth0/lock/pull/2492) ([frederikprijck](https://github.com/frederikprijck))
17
+
3
18
  ## [v12.3.0](https://github.com/auth0/lock/tree/v12.3.0) (2023-10-06)
4
19
  [Full Changelog](https://github.com/auth0/lock/compare/v12.2.0...v12.3.0)
5
20
 
package/DEVELOPMENT.md CHANGED
@@ -11,7 +11,7 @@ The SDK uses [Webpack](https://webpack.js.org/) to compile all JavaScript assets
11
11
  To perform a build, use the `build` script:
12
12
 
13
13
  ```
14
- yarn build
14
+ npm run build
15
15
  ```
16
16
 
17
17
  ## Running Tests
@@ -19,23 +19,23 @@ yarn build
19
19
  Unit tests can be executed using [Jest](https://jestjs.io/) by issuing the following command:
20
20
 
21
21
  ```
22
- yarn test
22
+ npm run test
23
23
  ```
24
24
 
25
25
  To interactively perform tests using Jest's `watch` mode, use:
26
26
 
27
27
  ```
28
- yarn test:watch
28
+ npm run test:watch
29
29
  ```
30
30
 
31
31
  End-to-end tests can be executed locally using [Karma](https://karma-runner.github.io/), in both watch and CLI mode:
32
32
 
33
33
  ```
34
34
  # CLI mode using Chrome Headless browser:
35
- yarn test:e2e
35
+ npm run test:e2e
36
36
 
37
37
  # Watch mode using Chrome desktop browser, in watch mode:
38
- yarn test:e2e:watch
38
+ npm run test:e2e:watch
39
39
  ```
40
40
 
41
41
  ## The SDK Playground
@@ -43,7 +43,7 @@ yarn test:e2e:watch
43
43
  To test the SDK manually and play around with the various options and features, you can invoke the Playground by using:
44
44
 
45
45
  ```
46
- yarn start
46
+ npm run start
47
47
  ```
48
48
 
49
49
  Next, open `https://localhost:3000/support`, which will display a simple web app that allows you to interact with Auth0 to test functionality. The HTML template in `support/index.html` can be modified to test various different pieces of functionality.
@@ -58,7 +58,7 @@ You can then use another SPA app to log in using this tenant that has this custo
58
58
 
59
59
  You may need to run Lock using HTTPS with a valid certificate if you want to do this testing in Safari, as Safari will not load mixed content pages, and will also not load HTTPS with untrusted testing certificates.
60
60
 
61
- Lock can already support HTTPS just by running `yarn start` if you have `mkcert` installed.
61
+ Lock can already support HTTPS just by running `npm run start` if you have `mkcert` installed.
62
62
 
63
63
  To install `mkcert`:
64
64
 
@@ -70,7 +70,7 @@ brew install nss # if you use Firefox
70
70
  mkcert install
71
71
 
72
72
  # Serve lock
73
- yarn start
73
+ npm run start
74
74
  ```
75
75
 
76
76
  Once Lock has started, use another SPA app to log in using a tenant with the template customized as above.
package/Makefile CHANGED
@@ -7,16 +7,16 @@
7
7
 
8
8
  install:
9
9
  @echo "Running install..."
10
- yarn install
10
+ npm run install
11
11
 
12
12
  test:
13
13
  @echo "Running test..."
14
- yarn test
14
+ npm run test
15
15
 
16
16
  build:
17
17
  @echo "Running build..."
18
- rm -rf dist && rm -rf build && yarn dist build
18
+ rm -rf dist && rm -rf build && npm run build
19
19
 
20
20
  publish:
21
21
  @echo "Running cdn-publish..."
22
- yarn publish:cdn
22
+ npm run publish:cdn
package/lib/CSSCore.js CHANGED
@@ -50,7 +50,6 @@ var CSSCore = {
50
50
  .replace(/^\s*|\s*$/g, ''); // trim the ends
51
51
  }
52
52
  }
53
-
54
53
  return element;
55
54
  },
56
55
  /**
@@ -4,8 +4,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  var _immutable = _interopRequireWildcard(require("immutable"));
5
5
  var _actions = require("../../../connection/database/actions");
6
6
  var _store = require("../../../store");
7
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
8
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
7
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
8
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
9
9
  var webApiMock = function webApiMock() {
10
10
  return require('core/web_api');
11
11
  };
@@ -177,7 +177,6 @@ describe('database/actions.js', function () {
177
177
  family_name: {
178
178
  value: 'Test <a href="https://www.google.co.uk">Fake link</a>' // HTML but not malicious
179
179
  },
180
-
181
180
  given_name: {
182
181
  value: '<img src=x onerror=alert(1)//>'
183
182
  },
@@ -3,8 +3,8 @@
3
3
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
4
  var _immutable = _interopRequireWildcard(require("immutable"));
5
5
  var _database = require("../../../connection/database");
6
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
7
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
6
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
7
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
8
8
  describe('database/index.js', function () {
9
9
  describe('databaseUsernameValue', function () {
10
10
  var getModel = function getModel(email, username, usernameRequired) {
@@ -5,8 +5,8 @@ var _immutable = _interopRequireDefault(require("immutable"));
5
5
  var _actions = require("../../../connection/enterprise/actions");
6
6
  var l = _interopRequireWildcard(require("../../../core/index"));
7
7
  var _index2 = require("../../../field/index");
8
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
8
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
9
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
  jest.mock('connection/database/index', function () {
12
12
  return {
@@ -6,8 +6,8 @@ var _testUtils = require("testUtils");
6
6
  var _immutable = _interopRequireDefault(require("immutable"));
7
7
  var i18n = _interopRequireWildcard(require("../../../i18n"));
8
8
  var _hrd_pane = _interopRequireDefault(require("../../../connection/enterprise/hrd_pane"));
9
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
10
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  var lock = _immutable.default.fromJS({
13
13
  id: '__lock-id__'
@@ -6,8 +6,8 @@ var _testUtils = require("testUtils");
6
6
  var _immutable = _interopRequireDefault(require("immutable"));
7
7
  var _data_utils = require("../../../utils/data_utils");
8
8
  var i18n = _interopRequireWildcard(require("../../../i18n"));
9
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
10
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  var _dataFns = (0, _data_utils.dataFns)(['i18n']),
13
13
  set = _dataFns.set;