auth0-lock 12.3.1 → 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.
- package/.github/actions/get-prerelease/action.yml +30 -0
- package/.github/actions/get-release-notes/action.yml +42 -0
- package/.github/actions/get-version/action.yml +21 -0
- package/.github/actions/npm-publish/action.yml +53 -0
- package/.github/actions/release-create/action.yml +47 -0
- package/.github/actions/tag-exists/action.yml +36 -0
- package/.github/workflows/codeql.yml +3 -3
- package/.github/workflows/npm-release.yml +83 -0
- package/.github/workflows/release.yml +25 -0
- package/.github/workflows/test.yml +7 -7
- package/.shiprc +3 -2
- package/.version +1 -0
- package/CHANGELOG.md +9 -0
- package/DEVELOPMENT.md +8 -8
- package/Makefile +4 -4
- package/lib/CSSCore.js +0 -1
- package/lib/__tests__/connection/database/actions.js +0 -1
- package/lib/__tests__/core/actions.js +2 -2
- package/lib/__tests__/core/sso/last_login_screen.js +2 -2
- package/lib/__tests__/core/tenant.js +2 -2
- package/lib/__tests__/core/web_api.js +2 -2
- package/lib/__tests__/engine/classic.js +2 -2
- package/lib/__tests__/field/captcha/auth0_v2.js +28 -0
- package/lib/__tests__/field/captcha/third_party_captcha.js +261 -0
- package/lib/__tests__/field/captcha.js +22 -0
- package/lib/__tests__/field/field.js +2 -2
- package/lib/__tests__/testUtils.js +2 -2
- package/lib/__tests__/ui/box/chrome.js +2 -2
- package/lib/connection/captcha.js +1 -1
- package/lib/connection/database/login_pane.js +2 -2
- package/lib/connection/database/login_sign_up_tabs.js +2 -2
- package/lib/connection/database/mfa_pane.js +2 -2
- package/lib/connection/database/password_reset_confirmation.js +2 -2
- package/lib/connection/database/reset_password.js +2 -2
- package/lib/connection/database/reset_password_pane.js +2 -2
- package/lib/connection/database/signed_up_confirmation.js +2 -2
- package/lib/connection/enterprise/actions.js +2 -2
- package/lib/connection/enterprise/hrd_pane.js +2 -2
- package/lib/connection/enterprise/hrd_screen.js +2 -2
- package/lib/connection/enterprise/kerberos_screen.js +2 -2
- package/lib/connection/enterprise/quick_auth_screen.js +2 -2
- package/lib/connection/passwordless/actions.js +3 -3
- package/lib/connection/passwordless/ask_vcode.js +2 -2
- package/lib/connection/passwordless/email_sent_confirmation.js +2 -2
- package/lib/core/actions.js +2 -2
- package/lib/core/client/index.js +2 -3
- package/lib/core/error_screen.js +2 -2
- package/lib/core/index.js +1 -1
- package/lib/core/loading_screen.js +2 -2
- package/lib/core/screen.js +2 -2
- package/lib/core/signed_in_confirmation.js +2 -2
- package/lib/core/sso/last_login_screen.js +2 -2
- package/lib/core/tenant/index.js +2 -3
- package/lib/core/web_api/helper.js +3 -3
- package/lib/core/web_api/p2_api.js +2 -2
- package/lib/core/web_api.js +2 -2
- package/lib/core.js +3 -3
- package/lib/engine/classic/login.js +2 -2
- package/lib/engine/classic/mfa_login_screen.js +2 -2
- package/lib/engine/classic/sign_up_pane.js +2 -2
- package/lib/engine/classic/sign_up_screen.js +2 -2
- package/lib/engine/classic.js +2 -2
- package/lib/engine/passwordless/social_or_email_login_screen.js +2 -2
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +2 -2
- package/lib/engine/passwordless.js +2 -2
- package/lib/field/captcha/captcha_pane.js +2 -2
- package/lib/field/captcha/third_party_captcha.js +72 -30
- package/lib/field/email/email_pane.js +2 -2
- package/lib/field/mfa-code/mfa_code_pane.js +2 -2
- package/lib/field/password/password_pane.js +2 -2
- package/lib/field/phone-number/phone_number_pane.js +2 -2
- package/lib/field/social/social_buttons_pane.js +2 -2
- package/lib/field/username/username_pane.js +2 -2
- package/lib/field/vcode/vcode_pane.js +2 -2
- package/lib/i18n.js +1 -1
- package/lib/lock.js +3 -3
- package/lib/passwordless.js +3 -3
- package/lib/quick-auth/actions.js +2 -2
- package/lib/ui/box/chrome.js +2 -2
- package/lib/ui/box/container.js +2 -2
- package/lib/ui/box/global_message.js +2 -2
- package/lib/ui/box/header.js +2 -2
- package/lib/ui/box/multisize_slide.js +2 -2
- package/lib/ui/box.js +2 -2
- package/lib/ui/input/captcha_input.js +2 -2
- package/lib/ui/input/checkbox_input.js +2 -2
- package/lib/ui/input/email_input.js +2 -2
- package/lib/ui/input/input_wrap.js +2 -2
- package/lib/ui/input/location_input.js +2 -2
- package/lib/ui/input/mfa_code_input.js +2 -2
- package/lib/ui/input/password/password_strength.js +2 -2
- package/lib/ui/input/password_input.js +2 -2
- package/lib/ui/input/phone_number_input.js +2 -2
- package/lib/ui/input/select_input.js +2 -2
- package/lib/ui/input/text_input.js +2 -2
- package/lib/ui/input/username_input.js +2 -2
- package/lib/ui/input/vcode_input.js +2 -2
- package/lib/ui/list.js +2 -2
- package/lib/utils/atom.js +2 -2
- package/lib/utils/cache.js +2 -2
- package/lib/utils/jsonp_utils.js +2 -2
- package/package.json +3 -2
- 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 }}
|
|
@@ -40,15 +40,15 @@ jobs:
|
|
|
40
40
|
uses: actions/checkout@v4
|
|
41
41
|
|
|
42
42
|
- name: Initialize CodeQL
|
|
43
|
-
uses: github/codeql-action/init@
|
|
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@
|
|
49
|
+
uses: github/codeql-action/autobuild@v3
|
|
50
50
|
|
|
51
51
|
- name: Perform CodeQL Analysis
|
|
52
|
-
uses: github/codeql-action/analyze@
|
|
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 }}
|
|
@@ -34,25 +34,25 @@ jobs:
|
|
|
34
34
|
uses: actions/setup-node@v4
|
|
35
35
|
with:
|
|
36
36
|
node-version: 18
|
|
37
|
-
cache: '
|
|
37
|
+
cache: 'npm'
|
|
38
38
|
|
|
39
39
|
- name: Install dependencies
|
|
40
|
-
run:
|
|
40
|
+
run: npm ci
|
|
41
41
|
|
|
42
42
|
- name: Build package
|
|
43
|
-
run:
|
|
43
|
+
run: npm run build
|
|
44
44
|
|
|
45
45
|
- name: Run `es-check`
|
|
46
|
-
run:
|
|
46
|
+
run: npm run test:es-check
|
|
47
47
|
|
|
48
48
|
- name: Run `i18n:validate`
|
|
49
|
-
run:
|
|
49
|
+
run: npm run i18n:validate
|
|
50
50
|
|
|
51
51
|
- name: Run Jest unit tests
|
|
52
|
-
run:
|
|
52
|
+
run: npm run test
|
|
53
53
|
|
|
54
54
|
- name: Run Karma end-to-end tests
|
|
55
|
-
run:
|
|
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
package/.version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v12.4.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
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
|
+
|
|
3
12
|
## [v12.3.1](https://github.com/auth0/lock/tree/v12.3.1) (2023-11-13)
|
|
4
13
|
[Full Changelog](https://github.com/auth0/lock/compare/v12.3.0...v12.3.1)
|
|
5
14
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
35
|
+
npm run test:e2e
|
|
36
36
|
|
|
37
37
|
# Watch mode using Chrome desktop browser, in watch mode:
|
|
38
|
-
|
|
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
|
-
|
|
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 `
|
|
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
|
-
|
|
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
|
-
|
|
10
|
+
npm run install
|
|
11
11
|
|
|
12
12
|
test:
|
|
13
13
|
@echo "Running test..."
|
|
14
|
-
|
|
14
|
+
npm run test
|
|
15
15
|
|
|
16
16
|
build:
|
|
17
17
|
@echo "Running build..."
|
|
18
|
-
rm -rf dist && rm -rf build &&
|
|
18
|
+
rm -rf dist && rm -rf build && npm run build
|
|
19
19
|
|
|
20
20
|
publish:
|
|
21
21
|
@echo "Running cdn-publish..."
|
|
22
|
-
|
|
22
|
+
npm run publish:cdn
|
package/lib/CSSCore.js
CHANGED
|
@@ -11,8 +11,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
11
11
|
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; }
|
|
12
12
|
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); }
|
|
13
13
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
-
function _toPropertyKey(
|
|
15
|
-
function _toPrimitive(
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
jest.mock('../../core/web_api', function () {
|
|
17
17
|
return {
|
|
18
18
|
__esModule: true,
|
|
@@ -7,8 +7,8 @@ var _testUtils = require("testUtils");
|
|
|
7
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
8
|
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); }
|
|
9
9
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
function _toPropertyKey(
|
|
11
|
-
function _toPrimitive(
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
12
|
jest.mock('ui/pane/quick_auth_pane', function () {
|
|
13
13
|
return (0, _testUtils.mockComponent)('quick_auth_pane');
|
|
14
14
|
});
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
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
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
var getInitTenant = function getInitTenant() {
|
|
8
8
|
return require('core/tenant/index').initTenant;
|
|
9
9
|
};
|
|
@@ -6,8 +6,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
function _toPropertyKey(
|
|
10
|
-
function _toPrimitive(
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
11
|
describe('Auth0WebApi', function () {
|
|
12
12
|
var originalWindow;
|
|
13
13
|
var LOCK_ID = 'lock-id';
|
|
@@ -4,8 +4,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
var getClassic = function getClassic() {
|
|
10
10
|
return require('engine/classic').default;
|
|
11
11
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
var _testUtils = require("testUtils");
|
|
5
|
+
var _third_party_captcha = require("../../../field/captcha/third_party_captcha");
|
|
6
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
+
describe('Auth0 V2', function () {
|
|
14
|
+
var component = /*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
15
|
+
provider: 'auth0_v2',
|
|
16
|
+
hl: "en",
|
|
17
|
+
sitekey: 'mySiteKey'
|
|
18
|
+
});
|
|
19
|
+
it('should match the snapshot', function () {
|
|
20
|
+
(0, _testUtils.expectComponent)(component).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
it('injects the script', function () {
|
|
23
|
+
var script = _toConsumableArray(window.document.querySelectorAll('script')).find(function (s) {
|
|
24
|
+
return s.src.startsWith('https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit&onload=');
|
|
25
|
+
});
|
|
26
|
+
expect(script).not.toBeUndefined();
|
|
27
|
+
});
|
|
28
|
+
});
|