-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable
extraParams
to persist to token refresh (#1529)
OKTA-750886 fix: persist `extraParams` passed to `/authorize` and include them during token refresh
- Loading branch information
1 parent
7deec3d
commit d89b413
Showing
26 changed files
with
185 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,11 @@ export TEST_RESULT_FILE_DIR="${REPO}/build2/reports/unit" | |
export CI=true | ||
export ISSUER=https://javascript-idx-sdk-idfirst.okta.com | ||
export [email protected] | ||
get_vault_secret_key repo_gh-okta-okta-auth-js/default password PASSWORD | ||
get_terminus_secret "/" password PASSWORD | ||
|
||
# for myaccount password API testing | ||
export [email protected] | ||
get_vault_secret_key devex/auth-js-sdk-vars a18n_api_key A18N_API_KEY | ||
get_terminus_secret "/" a18n_api_key A18N_API_KEY | ||
|
||
# This client has refresh token enabled and password optional | ||
export CLIENT_ID=0oa3b5fp4h02UIrjZ697 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,33 @@ if [ -n "${TEST_SUITE_ID}" ]; then | |
setup_service java 1.8.222 | ||
|
||
# this chrome install is not used, however it will install linux deps chrome needs (via apt-get) | ||
setup_service google-chrome-stable 118.0.5993.70-1 | ||
# setup_service google-chrome-stable 127.0.6533.88-1 | ||
setup_service google-chrome-stable 121.0.6167.85-1 | ||
# uses new chrome for testing installation utility (https://developer.chrome.com/blog/chrome-for-testing/) | ||
# output format: [email protected] /path/to/chrome/binary | ||
CHROME_INSTALL=$(npx @puppeteer/browsers install chrome@stable) | ||
echo $CHROME_INSTALL | ||
# extract installed version | ||
export CHROMEDRIVER_VERSION=$(echo $CHROME_INSTALL | awk '{print $1}' | cut -d'@' -f 2) | ||
echo $CHROMEDRIVER_VERSION | ||
# extract binary path | ||
export CHROME_BINARY=$(echo $CHROME_INSTALL | awk '{print $2}') | ||
echo $CHROME_BINARY | ||
# npm i -g @puppeteer/[email protected] | ||
# @puppeteer/browsers install chrome@stable] | ||
|
||
# OLD_NPM_REGISTRY=$(npm config get registry) | ||
# npm config set registry https://registry.npmjs.org | ||
# npm config get registry | ||
|
||
# echo "Running npx @puppeteer/browsers" | ||
# npx @puppeteer/browsers install chrome@stable --version | ||
# npx @puppeteer/browsers install chrome@stable | ||
# echo "Running puppeteer install" | ||
# CHROME_INSTALL=$(npx @puppeteer/[email protected] install chrome@stable) | ||
# echo "CHROME_INSTALL: $CHROME_INSTALL" | ||
# # extract installed version | ||
# export CHROMEDRIVER_VERSION=$(echo $CHROME_INSTALL | awk '{print $1}' | cut -d'@' -f 2) | ||
# echo $CHROMEDRIVER_VERSION | ||
# # extract binary path | ||
# export CHROME_BINARY=$(echo $CHROME_INSTALL | awk '{print $2}') | ||
# echo $CHROME_BINARY | ||
|
||
# npm config set registry $OLD_NPM_REGISTRY | ||
# wget -v https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.88/linux64/chrome-linux64.zip | ||
# echo $(ls) | ||
|
||
export CI=true | ||
else | ||
|
@@ -45,12 +61,18 @@ setup_e2e () { | |
|
||
export ISSUER=https://samples-javascript.okta.com/oauth2/default | ||
export [email protected] | ||
get_vault_secret_key repo_gh-okta-okta-auth-js/default password PASSWORD | ||
get_terminus_secret "/" password PASSWORD | ||
finish_log_group $? | ||
} | ||
|
||
run_e2e () { | ||
create_log_group "E2E Test Run" | ||
|
||
if [ -z "${PASSWORD}" ]; then | ||
echo "No PASSWORD has been set! Exiting..." | ||
exit ${TEST_FAILURE} | ||
fi | ||
|
||
if [ -n "${RUN_CUCUMBER}" ]; then | ||
if ! yarn test:e2e:cucumber; then | ||
echo "Cucumber tests failed! Exiting..." | ||
|
@@ -76,42 +98,49 @@ setup_sample_tests () { | |
export TEST_RESULT_FILE_DIR="${REPO}/build2/reports/e2e" | ||
|
||
export [email protected] | ||
get_vault_secret_key repo_gh-okta-okta-auth-js/default password PASSWORD | ||
get_terminus_secret "/" password PASSWORD | ||
|
||
export ORG_OIE_ENABLED=true | ||
get_vault_secret_key devex/auth-js-sdk-vars a18n_api_key A18N_API_KEY | ||
get_terminus_secret "/" a18n_api_key A18N_API_KEY | ||
|
||
|
||
# If this script is run as a bacon task, run against trexcloud environment | ||
if [[ "${BACON_TASK}" == true ]]; then | ||
echo "Running tests against trexcloud org" | ||
export ISSUER=https://javascript-idx-sdk.trexcloud.com | ||
export CLIENT_ID=0oa3r1keeeFFb7VMG0g7 | ||
export SPA_CLIENT_ID=0oa3r92jj01DWBeWC0g7 | ||
get_vault_secret_key devex/trex-js-idx-sdk-vars trex_client_secret CLIENT_SECRET | ||
get_vault_secret_key devex/trex-js-idx-sdk-vars trex_idx_sdk_org_api_key OKTA_API_KEY | ||
get_terminus_secret "/" trex_client_secret CLIENT_SECRET | ||
get_terminus_secret "/" trex_idx_sdk_org_api_key OKTA_API_KEY | ||
else | ||
if [ -n "$USE_OK_14" ]; then | ||
echo "Running tests against production (ok14) org" | ||
export CLIENT_ID=0oax3dcx0sak1KKb9696 | ||
export ISSUER=https://javascript-idx-sdk-new.okta.com | ||
export ISSUER_IDFIRST=https://javascript-idx-sdk-idfirst.okta.com | ||
get_vault_secret_key devex/prod-js-idx-sdk-vars prod_client_secret_new CLIENT_SECRET | ||
get_vault_secret_key devex/prod-js-idx-sdk-vars prod_idx_sdk_org_api_key_new OKTA_API_KEY | ||
get_vault_secret_key devex/prod-js-idx-sdk-vars prod_idx_idfirst_sdk_org_api_key OKTA_API_KEY_IDFIRST | ||
get_terminus_secret "/prod/idx" prod_client_secret_new CLIENT_SECRET | ||
get_terminus_secret "/prod/idx" prod_idx_sdk_org_api_key_new OKTA_API_KEY | ||
get_terminus_secret "/prod/idx" prod_idx_idfirst_sdk_org_api_key OKTA_API_KEY_IDFIRST | ||
else | ||
echo "Running tests against production (ok12) org" | ||
export ISSUER=https://javascript-idx-sdk.okta.com | ||
export CLIENT_ID=0oav2oxnlYjULp0Cy5d6 | ||
export SPA_CLIENT_ID=0oa17suj5x9khaVH75d7 | ||
get_vault_secret_key devex/prod-js-idx-sdk-vars prod_client_secret CLIENT_SECRET | ||
get_vault_secret_key devex/prod-js-idx-sdk-vars prod_idx_sdk_org_api_key OKTA_API_KEY | ||
get_terminus_secret "/prod/idx" prod_client_secret CLIENT_SECRET | ||
get_terminus_secret "/prod/idx" prod_idx_sdk_org_api_key OKTA_API_KEY | ||
fi | ||
fi | ||
finish_log_group $? | ||
} | ||
|
||
run_sample_tests () { | ||
create_log_group "E2E Test Run" | ||
|
||
if [ -z "${PASSWORD}" ]; then | ||
echo "No PASSWORD has been set! Exiting..." | ||
exit ${TEST_FAILURE} | ||
fi | ||
|
||
# Run the tests | ||
if ! yarn test:samples; then | ||
echo "tests failed! Exiting..." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.