diff --git a/package-lock.json b/package-lock.json index 626d556df..3f0d94bd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "kf-portal-ui", "version": "4.2.0", "dependencies": { "@ant-design/icons": "^4.6.2", @@ -28,7 +27,7 @@ "graphql": "^14.7.0", "graphql-tag": "^2.10.3", "jwt-decode": "^3.1.2", - "keycloak-js": "^15.0.1", + "keycloak-js": "^22.0.5", "less2sass": "^1.0.3", "lodash": "^4.17.21", "md5": "^2.3.0", @@ -9028,7 +9027,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -22464,19 +22462,15 @@ "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" }, "node_modules/keycloak-js": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-15.0.1.tgz", - "integrity": "sha512-5WBbdZhP39E9nsDJ44P8h1lvQTQawVcydew93fBBoKdSOUmhFPxmcKGS7WwxXqhbVEBe3burdZTFSPzTXfY0ZQ==", + "version": "22.0.5", + "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-22.0.5.tgz", + "integrity": "sha512-a7ZwCZeHl8tpeJBy102tZtAnHslDUOA1Nf/sHNF3HYLchKpwoDuaitwIUiS2GnNUe+tlNKLlCqZS+Mi5K79m1w==", + "license": "Apache-2.0", "dependencies": { - "base64-js": "1.3.1", - "js-sha256": "0.9.0" + "base64-js": "^1.5.1", + "js-sha256": "^0.9.0" } }, - "node_modules/keycloak-js/node_modules/base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - }, "node_modules/keyv": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", @@ -44875,8 +44869,7 @@ "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "basic-auth": { "version": "2.0.1", @@ -55259,19 +55252,12 @@ "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" }, "keycloak-js": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-15.0.1.tgz", - "integrity": "sha512-5WBbdZhP39E9nsDJ44P8h1lvQTQawVcydew93fBBoKdSOUmhFPxmcKGS7WwxXqhbVEBe3burdZTFSPzTXfY0ZQ==", + "version": "22.0.5", + "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-22.0.5.tgz", + "integrity": "sha512-a7ZwCZeHl8tpeJBy102tZtAnHslDUOA1Nf/sHNF3HYLchKpwoDuaitwIUiS2GnNUe+tlNKLlCqZS+Mi5K79m1w==", "requires": { - "base64-js": "1.3.1", - "js-sha256": "0.9.0" - }, - "dependencies": { - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - } + "base64-js": "^1.5.1", + "js-sha256": "^0.9.0" } }, "keyv": { diff --git a/package.json b/package.json index cbfad028b..47b04b4e4 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "graphql": "^14.7.0", "graphql-tag": "^2.10.3", "jwt-decode": "^3.1.2", - "keycloak-js": "^15.0.1", + "keycloak-js": "^22.0.5", "less2sass": "^1.0.3", "lodash": "^4.17.21", "md5": "^2.3.0", diff --git a/src/keycloak.ts b/src/keycloak.ts index 9cd986e00..ff33ca651 100644 --- a/src/keycloak.ts +++ b/src/keycloak.ts @@ -2,7 +2,7 @@ import Keycloak from 'keycloak-js'; import { kcAuthUrl, kcClientId, kcRealm } from './common/injectGlobals'; -const keycloak = Keycloak({ +const keycloak = new Keycloak({ realm: kcRealm, url: kcAuthUrl, clientId: kcClientId,