I am using Blazor Server Side.
This document specified "SignInManager and UserManager aren't supported in Razor components."
I have a custom Claim (example FirstName) by following the documentation. I can read it with "user.Claims.FirstOrDefault(s => s.Type == "FirstName")?.Value". If I update this Claim. When I read this from Claim, it was getting the previously Claim (I believe it is not refreshed). How do I refresh this Claim without using SignInManager/UserManager:
var user = await _userManager.GetUserAsync(User);
await _signInManager.RefreshSignInAsync(user);
If I look at the database, the value is updated. If I logout and re-login, the value is updated.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I am using Blazor Server Side.
This document specified "SignInManager and UserManager aren't supported in Razor components."
I have a custom Claim (example FirstName) by following the documentation. I can read it with "user.Claims.FirstOrDefault(s => s.Type == "FirstName")?.Value". If I update this Claim. When I read this from Claim, it was getting the previously Claim (I believe it is not refreshed). How do I refresh this Claim without using SignInManager/UserManager:
var user = await _userManager.GetUserAsync(User);
await _signInManager.RefreshSignInAsync(user);
If I look at the database, the value is updated. If I logout and re-login, the value is updated.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.