From 9c043eaaee2f94cd9529408f9561b89c3512f009 Mon Sep 17 00:00:00 2001 From: Prithvi Kanherkar Date: Tue, 23 Jul 2019 14:19:52 -0700 Subject: [PATCH] Revert "Merge pull request #851 from jodonnell/dev" This reverts commit 9e0dfe824f056da53989aabd93cb4f538a0d52c2, reversing changes made to 1b55af5017e8ce2869463fdd5f66762c3723afa1. --- lib/msal-core/src/Configuration.ts | 9 +++------ lib/msal-core/src/Constants.ts | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/msal-core/src/Configuration.ts b/lib/msal-core/src/Configuration.ts index cd86570da5..49a4018181 100644 --- a/lib/msal-core/src/Configuration.ts +++ b/lib/msal-core/src/Configuration.ts @@ -10,11 +10,7 @@ import { TelemetryEmitter } from "./telemetry/TelemetryTypes" * - local storage: MSAL uses browsers local storage to store its cache * - session storage: MSAL uses the browsers session storage to store its cache */ -export enum CacheLocationChoices { - LocalStorage = "localStorage", - SessionStorage = "sessionStorage" -} -export type CacheLocation = CacheLocationChoices.LocalStorage | CacheLocationChoices.SessionStorage; +export type CacheLocation = "localStorage" | "sessionStorage"; /** * Defaults for the Configuration Options @@ -124,7 +120,7 @@ const DEFAULT_AUTH_OPTIONS: AuthOptions = { }; const DEFAULT_CACHE_OPTIONS: CacheOptions = { - cacheLocation: CacheLocationChoices.SessionStorage, + cacheLocation: "sessionStorage", storeAuthStateInCookie: false }; @@ -161,3 +157,4 @@ export function buildConfiguration({ auth, cache = {}, system = {}, framework = }; return overlayedConfig; } + diff --git a/lib/msal-core/src/Constants.ts b/lib/msal-core/src/Constants.ts index aa8fa107cb..21c1992380 100644 --- a/lib/msal-core/src/Constants.ts +++ b/lib/msal-core/src/Constants.ts @@ -1,4 +1,4 @@ -import { CacheLocation, CacheLocationChoices } from "./Configuration"; +import { CacheLocation } from "./Configuration"; import { InteractionRequiredAuthErrorMessage as InteractionError } from "./error/InteractionRequiredAuthError"; // Copyright (c) Microsoft Corporation. All rights reserved. @@ -80,8 +80,8 @@ export class Constants { static get openidScope(): string { return "openid"; } static get profileScope(): string { return "profile"; } - static get cacheLocationLocal(): CacheLocation { return CacheLocationChoices.LocalStorage; } - static get cacheLocationSession(): CacheLocation { return CacheLocationChoices.SessionStorage; } + static get cacheLocationLocal(): CacheLocation { return "localStorage"; } + static get cacheLocationSession(): CacheLocation { return "sessionStorage"; } static get interactionTypeRedirect(): InteractionType { return "redirectInteraction"; } static get interactionTypePopup(): InteractionType { return "popupInteraction"; }