Gold to the first person to post a video showing how to properly generate authentication and authorization components using Blazor WITHOUT littering the project with Entity Framework, as so far, after looking far and wide, I have found no one.
@Serjaru2 жыл бұрын
Good practice and respect for subscribers when posting sources code. This is for the future!
@thibaudgalland15243 жыл бұрын
Great video ! How would you handle the authentication process with an external WebApi and JWT token ?
@RandomPerson-nh7yk Жыл бұрын
Fantastic tutorial! Very helpful and works like a charm. One request though for a follow up video, I guess: could you possibly walk through how to add user roles to this process. I want to have various roles like Admin, Contributor, Readonly, etc. I know there are tables in the created database like Roles and UserRoles where such association is created, but how do I have those populated when users are created and then how do I retrieve this information to restrict access to various components accordingly? This would be very very helpful indeed!
@onnuttig4 жыл бұрын
Thanks for the clear explanations, it was very easy to follow
@iancarr39235 жыл бұрын
Great thanks - fits it well with a current project.
@whynotsquat83152 жыл бұрын
I could not find your CLIENT-SIDE video. Also, no videos on WebAssembly Blazor at all? :(
@morph43584 жыл бұрын
What if we are using an external API to login using JWT and an external REST API to send and receive data, and we are using the Blazor app as if it was a Client which isn't directly connected to a database of its own? How would we then do this authentication/authorization?
@MrBa1433 жыл бұрын
I know your comment is old, but for everyone else looking for a "custom" solution with or without your own database. You can create your own custom authentication state provider, and that will provide methods, in which you return AuthStates containing claims. You can then generate these claims yourself, based on your own data (A token you have received from your AuthProvider containing your claims / data etc)
@KenzoArts4 жыл бұрын
Hello my friend, do you have a tutorial on CustomAuthentificationStateProvider ?
@trongphan61974 жыл бұрын
Thanks for the series. Can you do the login that using razor component for Blazor server?
@shahab20252 жыл бұрын
Thanks for Video, What is the name of IDE ?
@DeathStarKitty4 жыл бұрын
at 12:55 when you add the logout link to _LoginPartial it should be a submit button inside a form so that LogOut.cshtml can handle the post. Otherwise it doesn't do anything but display a blank page.
@naasthikan3 жыл бұрын
Can you please help me to do it i'm a beginner
@naasthikan3 жыл бұрын
@@DMS20231 can you show an example please >?
@naasthikan3 жыл бұрын
@@DMS20231 thanks for replying bro but it doesn't work
@ej2649 Жыл бұрын
Yes. instead of using "LogOut", use " Logout"
@graynoble47954 жыл бұрын
Great video! Thank you!
@joaquinlion5 жыл бұрын
Excuse me, are you using here the Authentication option when creating the project template from zero? how can i use this authentication option adding a postgreSql database for users data?
@talkathiriify5 жыл бұрын
Great job Thank you very much.
@bashirmanafikhi4 жыл бұрын
How can we set Identity layout to our blazor layout?
@jozefkomara70654 жыл бұрын
great tutorial
@rainron26643 жыл бұрын
Sir how about blazor server dealing with identity server?. 😊
@3wsystems6634 жыл бұрын
not found...the .AddDefaultIdentity .. services.AddDefaultIdentity().AddEntityFrameworkStores();
@MerrStudio4 жыл бұрын
How do I change the login form? I just want a login and a password and that's all. Also a simpler database table for logins.
@Balgoriusis4 жыл бұрын
You must implement your own user class and usestore and give that to the identity Builder. That also means making all of the database calls for the userstore.
@80-two4 жыл бұрын
Busta Rhymes?! Is that you?!
@petemartinez30173 жыл бұрын
I am a little confused because it seems like Identity Server 4 isn't free for Production.
@nickchapsas3 жыл бұрын
This is ASP.NET Core Identity not Identity Server 4
@petemartinez30173 жыл бұрын
@@nickchapsas wasnt aware of that! Thanks for letting me know.
@iraqjongen5 жыл бұрын
Where can I change the login view?
@christianrazvan4 жыл бұрын
Now make the same video without using entity framework
@mohammadmz105810 ай бұрын
Great video, but where is the source code
@iteospace Жыл бұрын
Try add scaffild identity pages for customizing and it broke your project
@fahadmullaji4 жыл бұрын
If you use visual studio and select authentication support, when you create the project then all you showed comes out of the box
@nickchapsas4 жыл бұрын
I am well aware of it. Rider has the exact same functionality. The point was to explain exactly what’s going on instead of blindly following it.
@manoa984 жыл бұрын
Wheres the Register and Login code page?
@nickchapsas4 жыл бұрын
It’s within the aspens.identity package
@filippomingo67843 жыл бұрын
@@nickchapsas yes but u dont show scaffolding, so my question is ho can i go to the Login's Url if is dosent exist the login page? The problem is that uo pass form the previous video to this one without showing some passages. I also pay the monthly bill but....
@kourosh2344 жыл бұрын
wasn't it easier to scaffold the identity area?
@nickchapsas4 жыл бұрын
It was you totally right but I would have to also explain what scaffolding is. I wanna keep my videos as self contained and as to the point as possible.
@e.h.56804 жыл бұрын
@@nickchapsas You hammered away at the keyboard for half an hour straight, to add something as straightforward as enabling authentication in a website. Either you are using the wrong way to do this or Blazor and its identity and authentication model is very broken.
@wassollderscheiss334 жыл бұрын
After watching until minute 1 I realized your example would employ those weirdo MS database tables for storing userdata. No sane person is interested in that. I would never litter my database with that.
@sinan7204 жыл бұрын
Do you realize that you can customize it? If you're not smart enough to be able do that than thats your problem. Dont call people insane just because you dont know how asp net core identity works.
@mohammadmz105810 ай бұрын
Just use mssql instead, like this: add nuget package: Microsoft.EntityFrameworkCore.SqlServer in program.cs add builder.Services.AddDbContext(options => options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection"))); and in in appsettings.json add "ConnectionStrings": { "DefaultConnection": "Server=localhost; Database=mydatabasename; Trusted_Connection=true; MultipleActiveResultSets=true; TrustServerCertificate=true;" },
@jd-code3 жыл бұрын
I would like to clear another question regarding a . Can you get in touch via email?
@mehrtashsouri68624 жыл бұрын
You are speaking Toooooo fast mate. but nice tutorial
@pilotboba4 жыл бұрын
You can adjust playback speed from the gear menu.
@mehrtashsouri68624 жыл бұрын
@@pilotboba Thanks Bob
@mehrtashsouri68624 жыл бұрын
@@pilotboba kzbin.info/www/bejne/aomXd6xujtasqbs
@resistnoevil6224 жыл бұрын
Just another incomplete video. Where is the data(username password) in database against which the user will be validated. You did not show us that information.
@nickchapsas4 жыл бұрын
Well that wasn't really polite but I'm going to reply anyway. Since we are using ASP.NET Core Identity, this is all managed automatically by .NET Core, and EF Core for us so we don't need to deal with it ourselves. This is why nobody is talking about it. Because nobody needs to. The framework is doing that for us.
@resistnoevil6224 жыл бұрын
@@nickchapsas thanks for the reply. However, isn't there a way to add more fields(such as Country, City, Zipcode...) in the user-registration form generated by Blazor?
@nickchapsas4 жыл бұрын
@@resistnoevil622 Yeah there is. You need to extend the IdentityUser class and add your own custom properties, then update the DbContext to be an IdentityDbContext and make sure that you create and run EF migrations and that's it.
@resistnoevil6224 жыл бұрын
@@nickchapsas we can do this via ApplicationUser class, not IdentityDbContext. But can we customize the internal authentication logic, change field types etc? If yes, how?