Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Sample project: https://github.com/havit/Bonusario
When upgraded from net6 to net7 the application started to fail with
` There was an error trying to log you in: '"undefined" is not valid JSON'
right after logging in to Azure AD (end of auth workflow).
Applies only for published version, does not occur in development.
After several attempts I found that disabling assembly trimming for Microsoft.AspNetCore.Components.WebAssembly.Authentication
resolves the issue.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
7.0.100
Anything else?
Workaround
Add
<assembly fullname="Microsoft.AspNetCore.Components.WebAssembly.Authentication" preserve="all" />
to your TrimmerRootDescriptor.xml
.
See https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options