Thank you for your video... 😀😀😀😀 Your can use "Ctrl+shift+v" for saw the all the copied data in the IDE and Just select the data and paste it. which you doing at the 7:42
Could you explain this, cause you know theres got to be some element of your roles being static such as the name of it. If you want to change the way your roles work or whether a user has different or evolving privileges then you either have to build it around a DB change or around building new policies.
ffs, if you paste code from somewhere else just keep your screen on that for at least a few seconds instead scrolling up and down, it's a nightmare to pause the video at the right time to rewrite it...
This tutorial would have been less confusing with a hosted project, by drawing a clear line between client, server, and shared. I'm new to Blazor/ASP, coming from the world of Wordpress/Laravel, and I'm in the process of piecing together a fully functional project template (duende-less blazorwithidentity, mysql, emailsender, blazorise). C# is my favourite language, and I think blazor is mature enough now for me to take the dive. As a complete novice, I can almost comprehend this tutorial, but it's a bit messy seeing signin-manager code inside of a razor file. I can't tell if this is a 'roll your own', and maybe if there's a more standard way of doing an admin page.
This is just a very quick and dirty way of doing this, its supposed to teach you how to implement the process but its not refined. Theres a lot of confusion on claims and such and how to implement them so i just focused on that more than implementing a page that would be more "standard".
Okay That makes sense I'm still going through your playlist, so I'm sure I'll piece all the parts together eventually. Also, thanks for making these videos.
Amazing video thank you. Im having a problem at 39:36 when I add user it says A key cannot be configured on 'IdentityRole' because it is a derived type. The key must be configured on the root type 'IdentityRole'.
Where is the discord? Also one thing I dont understand is the hardcoded password, so you make a user add a role, then how do they change their password? it would be good to know how to add a role to an existing user too, like select them from a list and add role to them. i presume you were just sort of doing it as an example. im very new to blazor but these vids are great thanks.
The simple reason is because the OnInitialize methods are executed when the component has completely rendered. You dont want to load the data earlier than when you know the component is there and ready.
I had already started using JWT tokens and didn't want to rely on Identity magic too much. Altho I did seed custom roles and assigned them to a user. Not using the AuthStateChanged event has been the only hurdle for now but I worked around it. I can do most with custom logic, I'll use the built-in stuff next time. The thing I'm stuck on now, is how to make sure the Admin can also do what the Editor can without explicitly including the Admin role everywhere. Is it done with policies? I understand Identity can't know the hierarchy of the customly seeded roles.
@@justblazorprogramming I now passed the roles of a user as claims in the JWT token (not best practice?). Altho I wonder how Blazor WASM would handle policies... Probably the same way? Add the policies as claims to the JWT token? Seems odd tho but if not like that, I can only think of magic.
Hey, I've been watching a lot of blazor server videos. I'm working on a project, in it, I have a table that lists all the users. I want to also show the users roles in the table. I was at first trying to use usermanager, but looping through the users to get the roles throws an exception. I imagine because it doesn't use a dbcontextfacory to access the database. Do you know the correct way to do this? For now I just created my own repository and method to use a dbcontextfacory and get that info. But I would like to not have to do that. Thanks.