AzureAD / microsoft-authentication-library-for-dotnet

Microsoft Authentication Library (MSAL) for .NET
https://aka.ms/msal-net
MIT License
1.39k stars 341 forks source link

[Feature Request] Improve error message when the distributed token cache is encrypted with Data Protection and decryption fails #4206

Closed bgavrilMS closed 1 year ago

bgavrilMS commented 1 year ago

See troubleshooting case for repro - https://github.com/AzureAD/microsoft-identity-web/wiki/Token-Cache-Troubleshooting#im-using-encryption-and-im-getting-deserialization-errors

We should catch / rethrow this exception with a better error message in the Id.Web.TokenCache project.

jmprieur commented 1 year ago

It's not token encryption, @bgavrilMS, it's encryption of the distributed cache.