Salman
Salman
CC#
Created by Salman on 3/26/2024 in #help
Identity Auth Customization in Asp.Net Core 8 Web API
Hi there! I'm using IdentityAPIEndpoints in my Web API. That includes many endpoints like register/login and others like for confirmation of email etc or 2fa and handles the whole authentication and authorization of the API. But now I wanna implement the RBAC(Role Base Acsess) in it. What I have done so far is that I'm manually creating a admin user by default and assigning him the admin role . But after that now I want to assign every user that registers via the register endpoint provided by the identity, to assign a default User role. So far I've unabled to find the solution like how to assign the roles on registration as the registeration and the whole auth process is being handled by the identity and I've no access to the inside code. Below is my Program.cs file :
4 replies