Skip to content

Commit 115be54

Browse files
fix: reverses broadcast-channel upgrade to fix breaking change (#1601)
OKTA-992195 fix: reverses broadcast-channel upgrade
1 parent 9da0734 commit 115be54

File tree

10 files changed

+83
-58
lines changed

10 files changed

+83
-58
lines changed

.bacon.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,3 @@ test_suites:
126126
# script_name: e2e-saucelabs
127127
# criteria: MERGE
128128
# queue_name: small
129-
130-
- name: semgrep
131-
script_path: ../okta-auth-js/scripts
132-
sort_order: '14'
133-
timeout: '10'
134-
script_name: semgrep
135-
criteria: MERGE
136-
queue_name: small

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
# 7.11.4
4+
5+
### Fixes
6+
7+
- [#1601](https://github.com/okta/okta-auth-js/pull/1601) fix: reverses `broadcast-channel` upgrade that raised minimum node engine requirement
8+
39
# 7.11.3
410

511
### Fixes
@@ -36,12 +42,18 @@
3642

3743
- [#1552](https://github.com/okta/okta-auth-js/pull/1552) fix: start poll request when document is visible and awaken in Mobile Safari 18.x
3844

45+
# 7.9.0
46+
47+
### Bug Fix
48+
49+
- [#1551](https://github.com/okta/okta-auth-js/pull/1551) fix: authn polling on iOS18 devices
50+
3951
# 7.8.1
4052

4153
### Bug Fix
4254

4355
- [#1547](https://github.com/okta/okta-auth-js/pull/1547) fix: replaces `jsonpath-plus` module
44-
- Address https://security.snyk.io/vuln/SNYK-JS-JSONPATHPLUS-7945884
56+
- Addresses https://security.snyk.io/vuln/SNYK-JS-JSONPATHPLUS-7945884
4557

4658
# 7.8.0
4759

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"name": "@okta/okta-auth-js",
44
"description": "The Okta Auth SDK",
5-
"version": "7.11.3",
5+
"version": "7.11.4",
66
"homepage": "https://github.com/okta/okta-auth-js",
77
"license": "Apache-2.0",
88
"main": "build/cjs/exports/default.js",
@@ -153,7 +153,7 @@
153153
"@peculiar/webcrypto": "^1.4.0",
154154
"Base64": "1.1.0",
155155
"atob": "^2.1.2",
156-
"broadcast-channel": "^7.1.0",
156+
"broadcast-channel": "~5.3.0",
157157
"btoa": "^1.2.1",
158158
"core-js": "^3.39.0",
159159
"cross-fetch": "^3.1.5",

samples/test/features/progressive-profiling-manage-phone-numbers.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Feature: Managing Phone Numbers
1515
And a user named "Mary"
1616
And she has an account with "active" state in the org
1717

18+
@smstest
1819
Scenario: Mary Adds a phone number
1920
Given she is on the Root View in an AUTHENTICATED state with ACR value "urn:okta:loa:2fa:any:ifpossible"
2021
Then she sees a table with her profile info

samples/test/support/management-api/a18nClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ export default class A18nClient {
128128

129129
const match = response?.content?.match(/Your verification code is (?<code>\d+)/);
130130
const code = match?.groups?.code;
131+
132+
if (!code) {
133+
console.log('Response', response);
134+
throw new Error('No SMS Code returned');
135+
}
136+
131137
return code;
132138
}
133139

scripts/semgrep.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

scripts/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [ -n "${TEST_SUITE_ID}" ]; then
1818
# setup_service node "${1:-v14.18.0}"
1919
setup_service node "${1:-v16.20.2}"
2020
# Use the cacert bundled with centos as okta root CA is self-signed and cause issues downloading from yarn
21-
setup_service yarn 1.21.1 /etc/pki/tls/certs/ca-bundle.crt
21+
setup_service yarn 1.22.22 /etc/pki/tls/certs/ca-bundle.crt
2222
else
2323
# bacon defines OKTA_HOME and REPO, define these relative to this file
2424
export OKTA_HOME=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd)

scripts/verify-registry-install.sh

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ cd ${OKTA_HOME}/${REPO}
1010
NODE_VERSION="${1:-v16.20.2}"
1111
setup_service node $NODE_VERSION
1212
# Use the cacert bundled with centos as okta root CA is self-signed and cause issues downloading from yarn
13-
setup_service yarn 1.22.19 /etc/pki/tls/certs/ca-bundle.crt
13+
# setup_service yarn 1.22.22 /etc/pki/tls/certs/ca-bundle.crt
14+
15+
npm i -g yarn
16+
yarn --version
17+
yarn config set caFilePath /etc/pki/tls/certs/ca-bundle.crt
1418

1519
# Install required dependencies
1620
yarn global add @okta/ci-append-sha
@@ -25,8 +29,9 @@ if ! ci-append-sha; then
2529
fi
2630

2731
# NOTE: hyphen rather than '@'
28-
artifact_version="$(ci-pkginfo -t pkgname)-$(ci-pkginfo -t pkgsemver)"
29-
published_tarball=${REGISTRY}/@okta/okta-auth-js/-/${artifact_version}.tgz
32+
artifact_version="$(ci-pkginfo -t pkgsemver)"
33+
artifact_name="$(ci-pkginfo -t pkgname)-$(ci-pkginfo -t pkgsemver)"
34+
published_tarball=${REGISTRY}/@okta/okta-auth-js/-/${artifact_name}.tgz
3035

3136
# verify npm install
3237
mkdir npm-test
@@ -40,12 +45,21 @@ fi
4045
echo "Done with npm installation test"
4146
popd
4247

48+
# installs package locally (yarn 1 struggles with registry authentication requirements)
49+
mkdir okta-auth-js
50+
cd okta-auth-js
51+
wget --header="Authorization: Bearer ${NPM_TOKEN}" ${published_tarball} -O ${artifact_version}.tgz
52+
ls -al
53+
cd ..
54+
4355
# verify yarn classic install
4456
mkdir yarn-classic-test
4557
pushd yarn-classic-test
4658
yarn init -y
59+
cp /root/.npmrc .npmrc
60+
yarn config list
4761

48-
if ! yarn add ${published_tarball}; then
62+
if ! yarn add ../okta-auth-js/${artifact_version}.tgz; then
4963
echo "yarn-classic install ${published_tarball} failed! Exiting..."
5064
exit ${FAILED_SETUP}
5165
fi
@@ -55,18 +69,30 @@ popd
5569
# verify yarn v3 install
5670
mkdir yarn-v3-test
5771
pushd yarn-v3-test
72+
5873
# use yarn v3
59-
yarn set version stable
60-
yarn config set caFilePath /etc/pki/tls/certs/ca-bundle.crt
61-
yarn init -y
62-
# add empty lock file, so this dir can be a isolated project
63-
touch yarn.lock
74+
# removes yarn-classic from PATH
75+
# export PATH="${PATH%:*}"
76+
# corepack enable
77+
# corepack prepare [email protected] --activate
78+
# which yarn
79+
# yarn set version 3.8.7
80+
# yarn --version
81+
82+
# yarn config set caFilePath /etc/pki/tls/certs/ca-bundle.crt
83+
# yarn init -y
84+
# cp /root/.npmrc .npmrc
85+
86+
# # add empty lock file, so this dir can be a isolated project
87+
# touch yarn.lock
88+
89+
# echo "installing"
90+
# if ! yarn --verbose add ../okta-auth-js/${artifact_version}.tgz; then
91+
# echo "yarn-v3 install @okta/okta-auth-js@${published_tarball} failed! Exiting..."
92+
# exit ${FAILED_SETUP}
93+
# fi
94+
# echo "Done with yarn v3 installation test"
6495

65-
if ! yarn add @okta/okta-auth-js@${published_tarball}; then
66-
echo "yarn-v3 install @okta/okta-auth-js@${published_tarball} failed! Exiting..."
67-
exit ${FAILED_SETUP}
68-
fi
69-
echo "Done with yarn v3 installation test"
7096
popd
7197

7298
exit $SUCCESS

test/e2e/pageobjects/OktaHome.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* See the License for the specific language governing permissions and limitations under the License.
1111
*/
1212

13+
import { getBaseUrl } from '../util/browserUtils';
1314

1415
/* eslint-disable max-len */
1516
class OktaHome {
@@ -25,10 +26,14 @@ class OktaHome {
2526

2627
async signOut() {
2728
if (process.env.ORG_OIE_ENABLED) {
28-
await browser.waitUntil(async () => this.userProfileButton.then(el => el.isDisplayed()), 5000, 'wait for user profile');
29-
await this.userProfileButton.then(el => el.click());
30-
await browser.waitUntil(async () => this.signOutLink.then(el => el.isDisplayed()), 5000, 'wait for signout link');
31-
await this.signOutLink.then(el => el.click());
29+
// await browser.waitUntil(async () => this.userProfileButton.then(el => el.isDisplayed()), 5000, 'wait for user profile');
30+
// await this.userProfileButton.then(el => el.click());
31+
// await browser.waitUntil(async () => this.signOutLink.then(el => el.isDisplayed()), 5000, 'wait for signout link');
32+
// await this.signOutLink.then(el => el.click());
33+
34+
// NOTE: clicking the signOut link seems to be causing test failures - "element not interactable"
35+
// possibly related to recent UI changes?
36+
await browser.url(getBaseUrl() + '/login/signout');
3237
} else {
3338
await browser.waitUntil(async () => this.userMenu.then(el => el.isDisplayed()), 5000, 'wait for user menu');
3439
await this.userMenu.then(el => el.click());

yarn.lock

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@
10011001
pirates "^4.0.5"
10021002
source-map-support "^0.5.16"
10031003

1004-
"@babel/runtime@7.27.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.16.0", "@babel/runtime@^7.27.0", "@babel/runtime@^7.6.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
1004+
"@babel/runtime@7.22.10", "@babel/runtime@^7.1.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.16.0", "@babel/runtime@^7.27.0", "@babel/runtime@^7.6.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
10051005
version "7.27.0"
10061006
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.27.0.tgz#fbee7cf97c709518ecc1f590984481d5460d4762"
10071007
integrity sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==
@@ -3768,16 +3768,6 @@ braces@^3.0.2, braces@~3.0.2:
37683768
dependencies:
37693769
fill-range "^7.0.1"
37703770

3771-
broadcast-channel@^7.1.0:
3772-
version "7.1.0"
3773-
resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-7.1.0.tgz#fe64bea202f45d0fa91ad19498154527fd78cfbe"
3774-
integrity sha512-InJljddsYWbEL8LBnopnCg+qMQp9KcowvYWOt4YWrjD5HmxzDYKdVbDS1w/ji5rFZdRD58V5UxJPtBdpEbEJYw==
3775-
dependencies:
3776-
"@babel/runtime" "7.27.0"
3777-
oblivious-set "1.4.0"
3778-
p-queue "6.6.2"
3779-
unload "2.4.1"
3780-
37813771
broadcast-channel@~4.17.0:
37823772
version "4.17.0"
37833773
resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-4.17.0.tgz#599d44674b09a4e2e07af6da5d03b45ca8bffd11"
@@ -3789,6 +3779,16 @@ broadcast-channel@~4.17.0:
37893779
rimraf "3.0.2"
37903780
unload "2.3.1"
37913781

3782+
broadcast-channel@~5.3.0:
3783+
version "5.3.0"
3784+
resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-5.3.0.tgz#9d9e55fb8db2a1dbbe436ae6d51382a354e76fc3"
3785+
integrity sha512-0PmDYc/iUGZ4QbnCnV7u+WleygiS1bZ4oV6t4rANXYtSgEFtGhB5jimJPLOVpPtce61FVxrH8CYylfO5g7OLKw==
3786+
dependencies:
3787+
"@babel/runtime" "7.22.10"
3788+
oblivious-set "1.1.1"
3789+
p-queue "6.6.2"
3790+
unload "2.4.1"
3791+
37923792
browser-process-hrtime@^1.0.0:
37933793
version "1.0.0"
37943794
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626"
@@ -9873,11 +9873,6 @@ [email protected]:
98739873
resolved "https://registry.yarnpkg.com/oblivious-set/-/oblivious-set-1.1.1.tgz#d9d38e9491d51f27a5c3ec1681d2ba40aa81e98b"
98749874
integrity sha512-Oh+8fK09mgGmAshFdH6hSVco6KZmd1tTwNFWj35OvzdmJTMZtAkbn05zar2iG3v6sDs1JLEtOiBGNb6BHwkb2w==
98759875

9876-
9877-
version "1.4.0"
9878-
resolved "https://registry.yarnpkg.com/oblivious-set/-/oblivious-set-1.4.0.tgz#1ee7c90f0605bb2a182fbcc8fffbe324d9994b43"
9879-
integrity sha512-szyd0ou0T8nsAqHtprRcP3WidfsN1TnAR5yWXf2mFCEr5ek3LEOkT6EZ/92Xfs74HIdyhG5WkGxIssMU0jBaeg==
9880-
98819876
obuf@^1.0.0, obuf@^1.1.2:
98829877
version "1.1.2"
98839878
resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e"

0 commit comments

Comments
 (0)