Skip to content

Commit

Permalink
fix: use local storage for storing MS tokens to avoid frequent logins -
Browse files Browse the repository at this point in the history
EXO-65633 (#80)

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
  • Loading branch information
ahamdi authored Sep 13, 2023
1 parent 85c3812 commit 13e3f97
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
},
Expand Down

0 comments on commit 13e3f97

Please sign in to comment.