Djovani
Djovani
CC#
Created by hutoanhill on 7/26/2024 in #help
✅ Configuring .NET 8 Identity
So configuring roles to work throughout even with API calls is just 3 steps, setting in Program.cs the addtional .AddRoles<IdentityRole> eventually also the RoleManager, then fixing the claims at the place where there are created with the Principal, then either in code or on the database add the roles, modify the registration page to handle assigning a defaut role and everything should be working
12 replies
CC#
Created by hutoanhill on 7/26/2024 in #help
✅ Configuring .NET 8 Identity
Depending on the project template you have selected look in program.cs you will see a registration for <AuthenticateStateProvider, HereTheNameOfTheLocalClass> usually the identity claims are set in there if you have a client server project setup then it is on both the client and the server, Client side it has a name like PersistingAuthenticationStateProvider, and server side PersistingRevalidatingAuthenticationStateProvider
12 replies
CC#
Created by hutoanhill on 7/26/2024 in #help
✅ Configuring .NET 8 Identity
The main thing there is to set the new roles claims, out of the box nothing is set
12 replies