Closed XShine555 closed 4 months ago
Nvm I figured out how to do it.
public async Task UpdateClaimNameAsync(HttpContext httpContext, string value)
{
var identity = httpContext.User.Identity;
(identity as ClaimsIdentity).RemoveClaim(httpContext.User.FindFirst(ClaimTypes.Name));
(identity as ClaimsIdentity).AddClaim(new Claim(ClaimTypes.Name, value));
}
I am quite lost and I have been trying to update the user and avatar every time the user enters my site for several hours, because if the user after logging in with discord changes the name, avatar or other information is not updated once the user re-enters the page. How could I solve this? So far I have done the basic authentication and I am stuck with this problem.