From 92ed9c126cd1e89d988d16d19b8aab0ec64ad0da Mon Sep 17 00:00:00 2001 From: Aaron Granick Date: Thu, 13 Aug 2020 17:17:05 -0700 Subject: [PATCH] 4.0 release (#412) * bump version to 4.0.0 * ES6 Refactor (#388) * move module from packages to repo root * rename browser/server index * update eslint, use ecmaVersion 2020 * feat: add typescript declarations (#413) * feat: support typescript, use named exports * removes "onSessionExpired" option (#444) implements active autoRenew * Builds to "build" folder, CDN content in "build/dist" * Fixes compatibility with CDN / static app --- .eslintignore | 6 + .eslintrc.json | 96 +- .gitignore | 2 +- .../okta-auth-js/.npmignore => .npmignore | 0 .vscode/launch.json | 4 +- CHANGELOG.md | 16 + README.md | 148 +- babel.config.js | 10 + babel.node.json | 22 + .../jest.browser.js => jest.browser.js | 9 +- .../jest.server.js => jest.server.js | 8 +- .../karma.conf.js => karma.conf.js | 44 +- lib/.eslintrc.json | 22 + lib/OktaAuthBase.ts | 87 + .../PromiseQueue.js => lib/PromiseQueue.ts | 47 +- .../TokenManager.js => lib/TokenManager.ts | 234 +- lib/browser/.eslintrc.json | 5 + lib/browser/browser.ts | 310 ++ lib/browser/browserStorage.ts | 155 + lib/browser/features.ts | 51 + lib/browser/fingerprint.ts | 66 + .../OAuthError.js => lib/browser/index.ts | 17 +- .../lib/builderUtil.js => lib/builderUtil.ts | 74 +- lib/clock.ts | 33 + lib/constants.ts | 24 + .../lib/crypto.js => lib/crypto.ts | 21 +- lib/errors/AuthApiError.ts | 39 + .../errors/AuthPollStopError.ts | 13 +- lib/errors/AuthSdkError.ts | 36 + lib/errors/CustomError.ts | 19 + .../errors/OAuthError.ts | 23 +- lib/errors/index.ts | 24 + .../fetch/fetchRequest.ts | 20 +- .../okta-auth-js/lib/http.js => lib/http.ts | 43 +- .../lib => lib}/license-header.txt | 0 .../lib/oauthUtil.js => lib/oauthUtil.ts | 83 +- .../okta-auth-js/lib/pkce.js => lib/pkce.ts | 46 +- .../serverIndex.js => lib/server/index.ts | 9 +- lib/server/server.ts | 33 + lib/server/serverStorage.ts | 59 + .../lib/session.js => lib/session.ts | 28 +- .../storageBuilder.ts | 7 +- .../okta-auth-js/lib/token.js => lib/token.ts | 372 +- lib/tx/AuthTransaction.ts | 214 + lib/tx/TransactionState.ts | 8 + lib/tx/api.ts | 84 + .../browserIndex.js => lib/tx/index.ts | 9 +- lib/tx/poll.ts | 139 + .../errors/AuthApiError.js => lib/tx/util.ts | 27 +- lib/types/Cookies.ts | 28 + lib/types/JWT.ts | 28 + lib/types/OAuth.ts | 56 + lib/types/OktaAuthOptions.ts | 57 + lib/types/Storage.ts | 58 + lib/types/Token.ts | 53 + lib/types/UserClaims.ts | 41 + lib/types/api.ts | 194 + lib/types/http.ts | 41 + lib/types/index.ts | 21 + .../okta-auth-js/lib/util.js => lib/util.ts | 155 +- package.json | 142 +- packages/okta-auth-js/.eslintignore | 9 - packages/okta-auth-js/.eslintrc.json | 14 - packages/okta-auth-js/.gitignore | 3 - packages/okta-auth-js/lib/browser/browser.js | 406 -- .../lib/browser/browserStorage.js | 149 - packages/okta-auth-js/lib/clock.js | 23 - packages/okta-auth-js/lib/constants.js | 14 - packages/okta-auth-js/lib/server/server.js | 54 - .../okta-auth-js/lib/server/serverStorage.js | 58 - packages/okta-auth-js/lib/tx.js | 384 -- packages/okta-auth-js/package.json | 88 - packages/okta-auth-js/test/.eslintrc.json | 5 - .../okta-auth-js/webpack.common.config.js | 28 - .../polyfill => polyfill}/index.js | 2 +- scripts/build.js | 64 + scripts/lint.sh | 2 +- scripts/publish.sh | 4 +- scripts/setup.sh | 7 +- scripts/travis.sh | 5 +- test/.eslintrc.json | 18 + test/app/.eslintignore | 1 + test/app/.eslintrc.js | 51 + test/app/.eslintrc.json | 14 - test/app/env.js | 1 - test/app/package.json | 10 +- test/app/server.js | 5 +- test/app/src/{config.js => config.ts} | 44 +- test/app/src/{constants.js => constants.ts} | 0 test/app/src/{form.js => form.ts} | 42 +- test/app/src/{index.js => index.ts} | 0 test/app/src/{testApp.js => testApp.ts} | 246 +- test/app/src/{tokens.js => tokens.ts} | 5 +- test/app/src/util.js | 8 +- .../src/{webpackEntry.js => webpackEntry.ts} | 29 +- test/app/tsconfig.json | 21 + test/app/webpack.config.js | 38 +- test/e2e/.eslintrc.json | 7 +- test/e2e/package.json | 4 +- test/e2e/runner.js | 1 + test/e2e/sauce.wdio.conf.js | 9 +- test/e2e/specs/logout.js | 2 +- test/e2e/specs/tokens.js | 3 - test/e2e/util/browserUtils.js | 1 + test/e2e/util/toQueryParams.js | 2 +- test/e2e/wdio.conf.js | 8 +- .../test => test}/karma/.eslintrc.json | 17 +- .../okta-auth-js/test => test}/karma/main.js | 1 - .../test => test}/karma/spec/crypto.js | 8 +- .../test => test}/karma/spec/features.js | 2 +- .../test => test}/karma/spec/loginFlow.js | 11 +- .../test => test}/karma/spec/pkce.js | 4 +- .../test => test}/karma/spec/renewToken.js | 261 +- .../test => test}/karma/spec/util.js | 25 +- .../test => test}/spec/.eslintrc.json | 24 +- .../spec/__snapshots__/mfa-challenge.js.snap | 0 .../test => test}/spec/browser.js | 94 +- .../test => test}/spec/browserStorage.js | 16 +- .../test => test}/spec/builderUtil.js | 2 +- .../okta-auth-js/test => test}/spec/clock.js | 8 +- .../test => test}/spec/cookies.js | 8 +- .../okta-auth-js/test => test}/spec/errors.js | 9 +- .../test => test}/spec/factor-enroll.js | 4 +- .../test => test}/spec/features.js | 12 +- .../test => test}/spec/fetch-request.js | 7 +- .../test => test}/spec/fingerprint.js | 6 +- .../test => test}/spec/general.js | 6 +- .../test => test}/spec/locked-out.js | 2 +- .../test => test}/spec/mfa-challenge.js | 4 +- .../test => test}/spec/mfa-enroll-activate.js | 4 +- .../test => test}/spec/mfa-enroll.js | 4 +- .../test => test}/spec/mfa-required.js | 4 +- .../test => test}/spec/no-auth-status.js | 2 +- .../test => test}/spec/oauthUtil.js | 30 +- .../test => test}/spec/password-expired.js | 2 +- .../test => test}/spec/password-reset.js | 2 +- .../test => test}/spec/password-warn.js | 2 +- .../okta-auth-js/test => test}/spec/pkce.js | 33 +- .../test => test}/spec/promiseQueue.js | 16 +- .../test => test}/spec/recovery.js | 2 +- .../test => test}/spec/recovery_challenge.js | 2 +- .../test => test}/spec/serverStorage.js | 4 +- .../test => test}/spec/session.js | 59 +- .../test => test}/spec/storageBuilder.js | 8 +- .../okta-auth-js/test => test}/spec/token.js | 310 +- .../test => test}/spec/tokenManager.js | 401 +- .../okta-auth-js/test => test}/spec/util.js | 2 +- .../test => test}/spec/webfinger.js | 2 +- test/support/.babelrc | 3 - test/support/.eslintrc.json | 3 + test/support/oauthUtil.js | 52 +- test/support/package.json | 5 + test/support/tokens.js | 2 +- test/support/util.js | 17 +- test/support/waitFor.js | 1 - tsconfig.json | 37 + types/global.d.ts | 15 + webpack.cdn.config.js | 38 + webpack.common.config.js | 46 + .../webpack.config.js => webpack.config.js | 20 +- ...ack.dev.config.js => webpack.dev.config.js | 8 +- ...ll.config.js => webpack.polyfill.config.js | 19 +- yarn.lock | 4089 +++++++++-------- 163 files changed, 6678 insertions(+), 4706 deletions(-) rename packages/okta-auth-js/.npmignore => .npmignore (100%) create mode 100644 babel.config.js create mode 100644 babel.node.json rename packages/okta-auth-js/jest.browser.js => jest.browser.js (73%) rename packages/okta-auth-js/jest.server.js => jest.server.js (82%) rename packages/okta-auth-js/karma.conf.js => karma.conf.js (73%) create mode 100644 lib/.eslintrc.json create mode 100644 lib/OktaAuthBase.ts rename packages/okta-auth-js/lib/PromiseQueue.js => lib/PromiseQueue.ts (54%) rename packages/okta-auth-js/lib/TokenManager.js => lib/TokenManager.ts (52%) create mode 100644 lib/browser/.eslintrc.json create mode 100644 lib/browser/browser.ts create mode 100644 lib/browser/browserStorage.ts create mode 100644 lib/browser/features.ts create mode 100644 lib/browser/fingerprint.ts rename packages/okta-auth-js/lib/errors/OAuthError.js => lib/browser/index.ts (73%) rename packages/okta-auth-js/lib/builderUtil.js => lib/builderUtil.ts (50%) create mode 100644 lib/clock.ts create mode 100644 lib/constants.ts rename packages/okta-auth-js/lib/crypto.js => lib/crypto.ts (80%) create mode 100644 lib/errors/AuthApiError.ts rename packages/okta-auth-js/lib/errors/AuthPollStopError.js => lib/errors/AuthPollStopError.ts (75%) create mode 100644 lib/errors/AuthSdkError.ts create mode 100644 lib/errors/CustomError.ts rename packages/okta-auth-js/lib/errors/AuthSdkError.js => lib/errors/OAuthError.ts (65%) create mode 100644 lib/errors/index.ts rename packages/okta-auth-js/lib/fetch/fetchRequest.js => lib/fetch/fetchRequest.ts (80%) rename packages/okta-auth-js/lib/http.js => lib/http.ts (70%) rename {packages/okta-auth-js/lib => lib}/license-header.txt (100%) rename packages/okta-auth-js/lib/oauthUtil.js => lib/oauthUtil.ts (78%) rename packages/okta-auth-js/lib/pkce.js => lib/pkce.ts (80%) rename packages/okta-auth-js/lib/server/serverIndex.js => lib/server/index.ts (79%) create mode 100644 lib/server/server.ts create mode 100644 lib/server/serverStorage.ts rename packages/okta-auth-js/lib/session.js => lib/session.ts (75%) rename packages/okta-auth-js/lib/storageBuilder.js => lib/storageBuilder.ts (88%) rename packages/okta-auth-js/lib/token.js => lib/token.ts (70%) create mode 100644 lib/tx/AuthTransaction.ts create mode 100644 lib/tx/TransactionState.ts create mode 100644 lib/tx/api.ts rename packages/okta-auth-js/lib/browser/browserIndex.js => lib/tx/index.ts (79%) create mode 100644 lib/tx/poll.ts rename packages/okta-auth-js/lib/errors/AuthApiError.js => lib/tx/util.ts (59%) create mode 100644 lib/types/Cookies.ts create mode 100644 lib/types/JWT.ts create mode 100644 lib/types/OAuth.ts create mode 100644 lib/types/OktaAuthOptions.ts create mode 100644 lib/types/Storage.ts create mode 100644 lib/types/Token.ts create mode 100644 lib/types/UserClaims.ts create mode 100644 lib/types/api.ts create mode 100644 lib/types/http.ts create mode 100644 lib/types/index.ts rename packages/okta-auth-js/lib/util.js => lib/util.ts (69%) delete mode 100644 packages/okta-auth-js/.eslintignore delete mode 100644 packages/okta-auth-js/.eslintrc.json delete mode 100644 packages/okta-auth-js/.gitignore delete mode 100644 packages/okta-auth-js/lib/browser/browser.js delete mode 100644 packages/okta-auth-js/lib/browser/browserStorage.js delete mode 100644 packages/okta-auth-js/lib/clock.js delete mode 100644 packages/okta-auth-js/lib/constants.js delete mode 100644 packages/okta-auth-js/lib/server/server.js delete mode 100644 packages/okta-auth-js/lib/server/serverStorage.js delete mode 100644 packages/okta-auth-js/lib/tx.js delete mode 100644 packages/okta-auth-js/package.json delete mode 100644 packages/okta-auth-js/test/.eslintrc.json delete mode 100644 packages/okta-auth-js/webpack.common.config.js rename {packages/okta-auth-js/polyfill => polyfill}/index.js (91%) create mode 100644 scripts/build.js create mode 100644 test/.eslintrc.json create mode 100644 test/app/.eslintignore create mode 100644 test/app/.eslintrc.js delete mode 100644 test/app/.eslintrc.json rename test/app/src/{config.js => config.ts} (71%) rename test/app/src/{constants.js => constants.ts} (100%) rename test/app/src/{form.js => form.ts} (58%) rename test/app/src/{index.js => index.ts} (100%) rename test/app/src/{testApp.js => testApp.ts} (79%) rename test/app/src/{tokens.js => tokens.ts} (79%) rename test/app/src/{webpackEntry.js => webpackEntry.ts} (65%) create mode 100644 test/app/tsconfig.json rename {packages/okta-auth-js/test => test}/karma/.eslintrc.json (55%) rename {packages/okta-auth-js/test => test}/karma/main.js (92%) rename {packages/okta-auth-js/test => test}/karma/spec/crypto.js (87%) rename {packages/okta-auth-js/test => test}/karma/spec/features.js (91%) rename {packages/okta-auth-js/test => test}/karma/spec/loginFlow.js (97%) rename {packages/okta-auth-js/test => test}/karma/spec/pkce.js (96%) rename {packages/okta-auth-js/test => test}/karma/spec/renewToken.js (54%) rename {packages/okta-auth-js/test => test}/karma/spec/util.js (66%) rename {packages/okta-auth-js/test => test}/spec/.eslintrc.json (50%) rename {packages/okta-auth-js/test => test}/spec/__snapshots__/mfa-challenge.js.snap (100%) rename {packages/okta-auth-js/test => test}/spec/browser.js (83%) rename {packages/okta-auth-js/test => test}/spec/browserStorage.js (98%) rename {packages/okta-auth-js/test => test}/spec/builderUtil.js (93%) rename {packages/okta-auth-js/test => test}/spec/clock.js (94%) rename {packages/okta-auth-js/test => test}/spec/cookies.js (93%) rename {packages/okta-auth-js/test => test}/spec/errors.js (92%) rename {packages/okta-auth-js/test => test}/spec/factor-enroll.js (97%) rename {packages/okta-auth-js/test => test}/spec/features.js (98%) rename {packages/okta-auth-js/test => test}/spec/fetch-request.js (98%) rename {packages/okta-auth-js/test => test}/spec/fingerprint.js (97%) rename {packages/okta-auth-js/test => test}/spec/general.js (97%) rename {packages/okta-auth-js/test => test}/spec/locked-out.js (95%) rename {packages/okta-auth-js/test => test}/spec/mfa-challenge.js (99%) rename {packages/okta-auth-js/test => test}/spec/mfa-enroll-activate.js (99%) rename {packages/okta-auth-js/test => test}/spec/mfa-enroll.js (97%) rename {packages/okta-auth-js/test => test}/spec/mfa-required.js (99%) rename {packages/okta-auth-js/test => test}/spec/no-auth-status.js (98%) rename {packages/okta-auth-js/test => test}/spec/oauthUtil.js (98%) rename {packages/okta-auth-js/test => test}/spec/password-expired.js (98%) rename {packages/okta-auth-js/test => test}/spec/password-reset.js (97%) rename {packages/okta-auth-js/test => test}/spec/password-warn.js (98%) rename {packages/okta-auth-js/test => test}/spec/pkce.js (93%) rename {packages/okta-auth-js/test => test}/spec/promiseQueue.js (97%) rename {packages/okta-auth-js/test => test}/spec/recovery.js (97%) rename {packages/okta-auth-js/test => test}/spec/recovery_challenge.js (97%) rename {packages/okta-auth-js/test => test}/spec/serverStorage.js (94%) rename {packages/okta-auth-js/test => test}/spec/session.js (80%) rename {packages/okta-auth-js/test => test}/spec/storageBuilder.js (98%) rename {packages/okta-auth-js/test => test}/spec/token.js (95%) rename {packages/okta-auth-js/test => test}/spec/tokenManager.js (86%) rename {packages/okta-auth-js/test => test}/spec/util.js (99%) rename {packages/okta-auth-js/test => test}/spec/webfinger.js (93%) delete mode 100644 test/support/.babelrc create mode 100644 tsconfig.json create mode 100644 types/global.d.ts create mode 100644 webpack.cdn.config.js create mode 100644 webpack.common.config.js rename packages/okta-auth-js/webpack.config.js => webpack.config.js (57%) rename packages/okta-auth-js/webpack.dev.config.js => webpack.dev.config.js (75%) rename packages/okta-auth-js/webpack.polyfill.config.js => webpack.polyfill.config.js (56%) diff --git a/.eslintignore b/.eslintignore index 3c3629e64..cfe561009 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,7 @@ +/test/support/xhr +/test/app/public node_modules +/build/dist +/build/lib +/build/types +/build/cjs diff --git a/.eslintrc.json b/.eslintrc.json index 18869c248..4a2385ac7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,8 +1,15 @@ { - "extends": ["eslint:recommended"], + "extends": [ + "eslint:recommended", + "plugin:node/recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:jsdoc/recommended" + ], "env": { "browser": false, - "commonjs": true + "commonjs": true, + "node": true }, "globals": { "Promise": true, @@ -12,7 +19,71 @@ "setInterval": true, "clearInterval": true }, + "settings": { + "jsdoc": { + "mode": "typescript", + "definedTags": [ + "type" + ] + } + }, + "overrides": [ + { + "files": ["polyfill/**/*", "build/polyfill/**/*"], + "env": { + "browser": true + }, + "rules": { + "node/no-unsupported-features/node-builtins": ["error", { + "ignores": ["TextEncoder", "TextDecoder"] + }] + } + }, + { + "files": ["build/**/*"], + "rules": { + "node/no-unpublished-require": 1, + "node/no-unpublished-import": 1 + } + }, + { + "files": ["{lib,build/lib}/{browser/*,crypto,pkce}.{js,ts}"], + "rules": { + "node/no-unsupported-features/node-builtins": ["error", { + "ignores": ["TextEncoder"] + }] + } + }, + { + "files": [ + "lib/**/*" + ], + "plugins": [ + "@typescript-eslint", + "jsdoc" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "./tsconfig.json", + "tsconfigRootDir": "./" + }, + "rules": { + "node/no-missing-import": ["error", { + "allowModules": [ + "@okta/okta-auth-js" + ], + "tryExtensions": [".js", ".ts"] + }] + } + } + ], "rules": { + "no-var": 0, + "prefer-rest-params": 0, + "prefer-spread": 0, + "prefer-const": 0, + "node/no-unpublished-require": 0, + "node/no-unpublished-import": 0, "camelcase": 2, "complexity": [2, 7], "curly": 2, @@ -34,10 +105,27 @@ "max-len": [2, 120], "max-params": [2, 5], "max-statements": [2, 25], - "quotes": [2, "single"], + "quotes": [2, "single", { "allowTemplateLiterals": true }], "semi": 2, "strict": 0, - "wrap-iife": [2, "any"] + "wrap-iife": [2, "any"], + "@typescript-eslint/no-var-requires": 0, + "@typescript-eslint/explicit-function-return-type": 0, + "@typescript-eslint/camelcase": 0, + "@typescript-eslint/no-this-alias": 0, + "@typescript-eslint/no-empty-function": 0, + "@typescript-eslint/no-use-before-define": 0, + "@typescript-eslint/ban-ts-ignore": 0, + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/interface-name-prefix": 0, + "@typescript-eslint/triple-slash-reference": 0, + "jsdoc/require-jsdoc": 0, + "jsdoc/require-param": 0, + "jsdoc/require-returns-description": 0, + "jsdoc/require-param-description": 0, + "jsdoc/require-returns": 0, + "jsdoc/no-undefined-types": 0 + }, "root": true } diff --git a/.gitignore b/.gitignore index e30169dd9..d3197fc0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .DS_Store -dist +build target node_modules build2 diff --git a/packages/okta-auth-js/.npmignore b/.npmignore similarity index 100% rename from packages/okta-auth-js/.npmignore rename to .npmignore diff --git a/.vscode/launch.json b/.vscode/launch.json index 1b5e06b26..23d89c95a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,7 +12,7 @@ "args": [ "--runInBand", "--no-cache", - "--config=packages/okta-auth-js/jest.browser.js", + "--config=jest.browser.js", "${relativeFile}" ], "console": "integratedTerminal", @@ -26,7 +26,7 @@ "args": [ "--runInBand", "--no-cache", - "--config=packages/okta-auth-js/jest.browser.js", + "--config=jest.server.js", "${relativeFile}" ], "console": "integratedTerminal", diff --git a/CHANGELOG.md b/CHANGELOG.md index 6301b54c1..3e715bd72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,23 @@ # Changelog +## 4.0.0 + +### Features + +- [#413](https://github.com/okta/okta-auth-js/pull/413) Adds support for Typescript. Uses named exports instead of default export. +- [#444](https://github.com/okta/okta-auth-js/pull/444) New method `tokenManager.hasExpired` to test if a token is expired + +### Breaking Changes + +- [#444](https://github.com/okta/okta-auth-js/pull/444) + - Implements "active" autoRenew. Previously tokens would be renewed or removed when calling `tokenManager.get`. Now they will be renewed or removed in the background. If autoRenew is true, tokens will be renewed before expiration. If autoRenew is false, tokens will be removed from storage on expiration. + - `onSessionExpired` option has been removed. [TokenManager events](#tokenmanageronevent-callback-context) can be used to detect and handle token renewal errors. + - `tokenManager.get` no longer implements autoRenew functionality (autoRenew is done by a separate process within `TokenManager`). Even with `autoRenew`, it is possible that the token returned from the TokenManager may be expired, since renewal is an asynchronous process. New method `tokenManager.hasExpired` can be used to test the token and avoid this potential race condition. + ## 3.2.3 +### Bug Fixes + - [#440](https://github.com/okta/okta-auth-js/pull/440) Fixes signOut XHR fallback to reload page only if postLogoutRedirectUri matches the current URI - [#445](https://github.com/okta/okta-auth-js/pull/445) Clears access token from storage after token revocation diff --git a/README.md b/README.md index cf085d655..d9779a8d4 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ * [API Reference](#api-reference) * [Building the SDK](#building-the-sdk) * [Node JS and React Native Usage](#node-js-and-react-native-usage) +* [Migrating from previous versions](#migrating-from-previous-versions) * [Contributing](#contributing) The Okta Auth JavaScript SDK builds on top of our [Authentication API](https://developer.okta.com/docs/api/resources/authn) and [OpenID Connect & OAuth 2.0 API](https://developer.okta.com/docs/api/resources/oidc) to enable you to create a fully branded sign-in experience using JavaScript. @@ -24,11 +25,14 @@ You can learn more on the [Okta + JavaScript][lang-landing] page in our document This library uses semantic versioning and follows Okta's [library version policy](https://developer.okta.com/code/library-versions/). -:heavy_check_mark: The current stable major version series is: `3.x` +## Release Status + +:heavy_check_mark: The current stable major version series is: `4.x` | Version | Status | | ------- | -------------------------------- | -| `3.x` | :heavy_check_mark: Stable | +| `4.x` | :heavy_check_mark: Stable | +| `3.x` | :warning: Retiring on 2021-05-30 | | `2.x` | :warning: Retiring on 2020-09-30 | | `1.x` | :x: Retired | | `0.x` | :x: Retired | @@ -138,10 +142,17 @@ npm install --save @okta/okta-auth-js If you are using the JS on a web page from the browser, you can copy the `node_modules/@okta/okta-auth-js/dist` contents to publicly hosted directory, and include a reference to the `okta-auth-js.min.js` file in a `