Updated MoonCore dependencies. Switched to asp.net core native authentication scheme abstractions. Updated claim usage in frontend
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
|
||||
<div class="col-span-12 md:col-span-6">
|
||||
<div class="font-medium leading-[1.1] tracking-tight">
|
||||
@@ -18,7 +19,6 @@
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var identity = await AuthState;
|
||||
var usernameClaim = identity.User.Claims.ToArray().First(x => x.Type == "username");
|
||||
Username = usernameClaim.Value;
|
||||
Username = identity.User.FindFirst(ClaimTypes.Name)!.Value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user