Skip to content

Commit 0cb8305

Browse files
committed
Deprecate temporaryCacheLocation
1 parent 3b15633 commit 0cb8305

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/msal-browser/docs/caching.md

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ To faciliate efficient token acquisition while maintaining a good UX, MSAL cache
7171
> :bulb: The authorization code is only stored in memory and will be discarded after redeeming it for tokens.
7272
7373
## Warning :warning:
74+
75+
**NOTE: `temporaryCacheLocation` is deprecated as of MSAL v5 and will be removed in a future release.**
76+
7477
Overriding `temporaryCacheLocation` should be done with caution. Specifically when choosing `localStorage`. Interaction in more than one tab/window will not be supported and you may receive `interaction_in_progress` errors unexpectedly. This is an escape hatch, not a fully supported feature.
7578

7679
When using MSAL.js with the default configuration in a scenario where the user is redirected after successful authentication in a new window or tab, the OAuth 2.0 Authorization Code with PKCE flow will be interrupted. In this case, the original window or tab where the authentication state (code verifier and challenge) are stored, will be lost, and the authentication flow will fail.

lib/msal-browser/src/config/Configuration.ts

+2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ export type CacheOptions = {
122122
*/
123123
cacheLocation?: BrowserCacheLocation | string;
124124
/**
125+
* @deprecated
126+
* temporaryCacheLocation is deprecated and will be removed in a future release.
125127
* Used to specify the temporaryCacheLocation user wants to set. Valid values are "localStorage", "sessionStorage" and "memoryStorage".
126128
*/
127129
temporaryCacheLocation?: BrowserCacheLocation | string;

0 commit comments

Comments
 (0)