From 2780b4262a0a8e6521722be68c751541c3bd8a3e Mon Sep 17 00:00:00 2001 From: MickaelMenet <71713999+MickaelMenet@users.noreply.github.com> Date: Tue, 18 Jul 2023 11:36:22 +0200 Subject: [PATCH] Upgrade keycloak js version to 22 (#337) * fix: upgrade version keycloack 16.1.1 => 19.0.3 * fix: add last version of keycloack-js 22.0.0 * fix: bump package version to 2.4.8 * fix: add new to the constructor * fix: bump version to 2.4.9 --- package.json | 4 ++-- src/utils/keycloak/keycloakOidcClient.js | 2 +- yarn.lock | 19 +++++++------------ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index fb72dac7..a7bb87f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stromae", - "version": "2.4.6", + "version": "2.4.9", "description": "Web application for the management of questionnaires powered by Lunatic", "repository": { "type": "git", @@ -19,7 +19,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "date-fns": "^2.29.3", - "keycloak-js": "16.1.1", + "keycloak-js": "^22.0.0", "oidc-client": "^1.10.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/src/utils/keycloak/keycloakOidcClient.js b/src/utils/keycloak/keycloakOidcClient.js index 07d9d85e..3fa98748 100644 --- a/src/utils/keycloak/keycloakOidcClient.js +++ b/src/utils/keycloak/keycloakOidcClient.js @@ -18,7 +18,7 @@ export const createKeycloakOidcClient = async ({ urlPortail, evtUserActivity, }) => { - const keycloakInstance = Keycloak({ url, realm, clientId }); + const keycloakInstance = new Keycloak({ url, realm, clientId }); const isAuthenticated = await keycloakInstance .init({ diff --git a/yarn.lock b/yarn.lock index 161ce62b..690db376 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3467,11 +3467,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== - base64-js@^1.0.2, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -8382,7 +8377,7 @@ js-sdsl@^4.1.4: resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== -js-sha256@0.9.0: +js-sha256@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== @@ -8591,13 +8586,13 @@ jss@10.10.0, jss@^10.5.1: array-includes "^3.1.5" object.assign "^4.1.3" -keycloak-js@16.1.1: - version "16.1.1" - resolved "https://registry.yarnpkg.com/keycloak-js/-/keycloak-js-16.1.1.tgz#e235f212cc336b9752863ebdce7f7a5707b11b8a" - integrity sha512-AkRNIJFSMLfQKIBKK31UL4FGI59MQFf68Bf8I+PFbOSKNtnfGVPYLiZeJgy03Kv5ddswHBjVZOY5T0f5RpZpLw== +keycloak-js@^22.0.0: + version "22.0.0" + resolved "https://registry.yarnpkg.com/keycloak-js/-/keycloak-js-22.0.0.tgz#69c6d194f5908c754b5ed6a515fed107164df3a3" + integrity sha512-4/xJm6aswS/RLD3h3OhfZTrHAH6Ku/oDvBbK8/tgTxg0rywbxKUjCRUG2Zkw7UGwJPsrqhVT/nmsGTQqj3sQAw== dependencies: - base64-js "1.3.1" - js-sha256 "0.9.0" + base64-js "^1.5.1" + js-sha256 "^0.9.0" keycode@^2.1.7: version "2.2.1"