I'm currently using Radzen Libary for creating a Blazor Web Application (Client + Server) .User authentication is managed using ASP.Net Core Identity with an MS SQL Server Database.
The issue I face is the value of User.Id within the SecurityService keeps changing on each refresh/ load. So I'm unable to track the state of the user progress.
The SecurityService doesn't set Id by default. Feel free to extend the Initialize method as needed:
public bool Initialize(AuthenticationState result)
{
Principal = result.User;
var name = Principal.FindFirstValue(ClaimTypes.Name) ?? Principal.FindFirstValue("name");
if (name != null)
{
User = new ApplicationUser { Name = name };
}
return IsAuthenticated();
}