Skip to content

Commit d0f5b7d

Browse files
committed
Fix loading issues with disk based token cache
1 parent 1e291d0 commit d0f5b7d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Common/Commands.Common.Authentication/Authentication/ProtectedFileTokenCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public byte[] CacheData
4949
set
5050
{
5151
Deserialize(value);
52+
HasStateChanged = true;
53+
EnsureStateSaved();
5254
}
5355
}
5456

src/Common/Commands.Common.Authentication/AzureSessionInitializer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ static IAzureSession CreateInstance(IDataStore dataStore = null)
7474
FileUtilities.DataStore = session.DataStore;
7575
FileUtilities.EnsureDirectoryExists(session.ProfileDirectory);
7676
var cacheFile = Path.Combine(session.ProfileDirectory, session.TokenCacheFile);
77-
var contents = new byte[0];
78-
session.TokenCache = new ProtectedFileTokenCache(cacheFile, dataStore);
77+
session.TokenCache = new ProtectedFileTokenCache(cacheFile, session.DataStore);
7978
}
8079
catch
8180
{

0 commit comments

Comments
 (0)