feat(account): enable native account management and register API Identity services
Some checks failed
Dotnet build and test / build (pull_request) Has been cancelled

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-10-09 13:30:01 +01:00
commit f050ee4456
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
9 changed files with 1402 additions and 102 deletions

View file

@ -1,6 +1,7 @@
using Anthropic.SDK;
using IdentityModel;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Yavsc.Abstract.Interfaces;
@ -86,6 +87,16 @@ internal class Program
options.UseNpgsql(builder.Configuration.GetConnectionString(
Yavsc.Constants.YavscConnectionStringName)));
services.AddIdentityCore<ApplicationUser>(options =>
{
options.ClaimsIdentity.UserNameClaimType = JwtClaimTypes.PreferredUserName;
options.ClaimsIdentity.RoleClaimType = Constants.RoleClaimType;
})
.AddRoles<IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders()
.AddSignInManager();
services.AddLocalization(options =>
{
options.ResourcesPath = "Resources";