Open NeilMacMullen opened 3 years ago
@mjcheetham - what does GCM on WSL ?
If you install GCM on Windows, and then 'link' to it from the WSL Git via config, we use the Windows APIs/cache storage.
If you install GCM natively in WSL, we treat it identically to a normal Linux install. We will try and use WithLinuxKeyring(..)
- we then catch
MsalCachePersistenceException
s from .VerifyPersistence()
and retry with WithLinuxUnprotectedFile()
(and print a warning to the user).
When executing the following code on an application targeting .net 5 and the linux-x64 runtime and running on WSL (Ubuntu)
I receive this exception:
A workaround is to add
.WithLinuxUnprotectedFile()
It's also possible there is some piece of Linux magic that would allow the code to work with secure-storage (install lib-secret?)
I would suggest that if possible this scenario should be detected and a more useful exception/message generated. E.g. "No secure storage available: create Storage using "WithLinuxUnprotectedFile" or install lib-secret using "sudu apt-get install....".