From ffd33cad8b4004a7de281cc59ede96081a65dad9 Mon Sep 17 00:00:00 2001 From: Ali HAMDI Date: Thu, 21 Sep 2023 12:19:31 +0100 Subject: [PATCH] fix: use local storage for storing MS tokens to avoid frequent logins - EXO-65633 (#81) Priori to this fix, users were requested to login each few moments because their tokens get expired soon. This change will cache tokens in local storage of the browser instead of the session to make them reusable and enhance the UX https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/caching.md --- .../agenda-connectors/office-connector/agendaOfficeConnector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agenda-connectors-webapp/src/main/webapp/vue-app/agenda-connectors/office-connector/agendaOfficeConnector.js b/agenda-connectors-webapp/src/main/webapp/vue-app/agenda-connectors/office-connector/agendaOfficeConnector.js index 81fa5e3a..8673d711 100644 --- a/agenda-connectors-webapp/src/main/webapp/vue-app/agenda-connectors/office-connector/agendaOfficeConnector.js +++ b/agenda-connectors-webapp/src/main/webapp/vue-app/agenda-connectors/office-connector/agendaOfficeConnector.js @@ -26,7 +26,7 @@ export default { postLogoutRedirectUri: window.location.origin, }, cache: { - cacheLocation: 'sessionStorage', // This configures where your cache will be stored + cacheLocation: 'localStorage', // This configures where your cache will be stored storeAuthStateInCookie: true, // Set this to 'true' if you are having issues on IE11 or Edge } },