Replace MSAL and custom cookie auth with Microsoft.Identity.EntityFramework Also some UI redesign to accommodate different login experience.
12 lines
259 B
C#
12 lines
259 B
C#
using System.Security.Claims;
|
|
|
|
namespace Shogi.Api.Controllers;
|
|
|
|
public static class Extentions
|
|
{
|
|
public static string? GetId(this ClaimsPrincipal self)
|
|
{
|
|
return self.Claims.FirstOrDefault(claim => claim.Type == ClaimTypes.NameIdentifier)?.Value;
|
|
}
|
|
}
|