Salman
✅ How to setup environment variables in Azure Web App
I've deployed my Blazor Server App to Azure Web App. And in App settings I've added some items e.g my Cloudinary URL and in Connection Strings section I've made a connection string named as "DefaultConnection" same as it was in my appsettings.json file. However I'm getting some Postgress EFCore error in production.
Here's my Program.cs:
https://paste.mod.gg/ltvubhnjcema/0
My appsettings.json structure:
AI told me that the environment variables I set are supposed to override these values but apparently they aren't and I'm not sure how to check. Can someone guide me the correct way to do it. Thanks
20 replies
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