Closed
Description
I have a wasm standalone app that uses AzureAD and I am trying to set the cache configuration to "sessionStorage" but tokens are always stored in localStorage.
When I set the cacheLocation directly it causes a System.NullReferenceException
builder.Services.AddMsalAuthentication(options =>
{
var config = options.ProviderOptions;
config.Authentication.Authority = "https://login.microsoftonline.com/22222222-2222-2222-2222-222222222222";
config.Authentication.ClientId = "11111111-1111-1111-1111-111111111111";
config.Cache.CacheLocation = "sessionStorage";
});
and when I try to set the configuration as :
config.Cache = new MsalCacheOptions
{
CacheLocation = "sessionStorage",
};
It appears to have no effect and the cache location is still in Local Storage and user auth state persists across browser tabs and after closing/reopening the browser.