Skip to content

Commit 598cfdc

Browse files
committed
fixed setting storeAuthStateInCookie in MsalProvider
1 parent da9a12c commit 598cfdc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/mgt/src/providers/MsalProvider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,12 @@ export class MsalProvider extends IProvider {
341341
msalConfig.auth.clientId = config.clientId;
342342
msalConfig.cache = msalConfig.cache || {};
343343
msalConfig.cache.cacheLocation = msalConfig.cache.cacheLocation || 'localStorage';
344-
msalConfig.cache.storeAuthStateInCookie = msalConfig.cache.storeAuthStateInCookie || true;
344+
if (
345+
typeof msalConfig.cache.storeAuthStateInCookie === 'undefined' ||
346+
msalConfig.cache.storeAuthStateInCookie === null
347+
) {
348+
msalConfig.cache.storeAuthStateInCookie = true;
349+
}
345350

346351
if (config.authority) {
347352
msalConfig.auth.authority = config.authority;

0 commit comments

Comments
 (0)