Thank you Patrick for demystifying .Net 8 user authentication & authorization. Something that until seeing your video seemed very baffling to me!
@misaghn8027 Жыл бұрын
As a junior, with every comment that you take in the video you are helping me understand what the code is all about thanks for this extremely helpful video.
@gagethornewell7497Ай бұрын
Thank you for the authorization part. I spent a long time trying to figure it out and this video really helped me. Thank you thank you.
@barry1048 Жыл бұрын
Thank you for another extremely helpful video Patrick! I would love to see a video on .NET 8 Blazor Authentication & Authorization with Identity using Dapper instead of EF if possible.
@TheCodeCreator10 ай бұрын
Yes, with Dapper or other database system. That would be great.
@Duelweb8 ай бұрын
Rockin n' rollin !! Good stuff man!!
@SanityIT Жыл бұрын
This an important video to check out for knowing Blazor. Thank you Patrick for this.
@hendrikneumann30768 ай бұрын
Thank you very much for making this video - it helped me a lot!
@stephenshillitoe81710 ай бұрын
Another excellent video Patrick! Thank you for demystifying .Net 8 Authentication & Authorization!
@sharonroy987711 ай бұрын
Thanks for the video, it's giving me a jumpstart building my first Blazor app with .Net 8 and identity stuff. Slight changes to the project template now, but nothing I couldn't figure out. Cheers!
@khayolnoranjov918Күн бұрын
Thank you, Patrick. Good job.
@5ROC10 ай бұрын
Excellent ! Thank for showing us all this
@michaelrafales27825 ай бұрын
Thank you very much! This is very helpful and you explained it very well!
@flightcommander85516 ай бұрын
Excellent! Thank you so much! Tried it my side and it works well. One question, how can I get access to the current user's logged in details (more specifically the added properties?
@wisnu7734 Жыл бұрын
hi patrick...how i call api with token ?....we know your video the authentication and authorazation is base on cookies....what i mean is when using interactive auto how we send token after all .net assemblies are finished download....??
@kalpeshblue2 Жыл бұрын
Thank for making this. Can you make video on Authentication & Authorization without Identity (Basic Authentication)
@Swoleasaurus Жыл бұрын
Yes! please do one with Azure AD or Azure B2C.
@joetaylor010 Жыл бұрын
I second this - I previously used Windows authentication for an intranet, but that doesn't seem to be supported as easily in .NET 8
@michaelfernandes6893 Жыл бұрын
Please continue the film with an http client and then pass the role to the api. Please help us
@MrFEMGM10 ай бұрын
Excellent video, thank you. It would be very helpful to indicate what needs to be done, when working on a project that originally does not have the identity management and you need to add it?
@Edvard-Aliev10 ай бұрын
Спасибо большое! По сути мне нравиться больше C# net core чем php и Laravel. У меня есть задачи по созданию школьной CRM, скорей всего я буду делать её на платформе net core.
@shmupful10 ай бұрын
Thank you for this great content!
@born2duh7 ай бұрын
Thank God you exist, i can't understand shit from Indian's tutorials
@RickGraner11 ай бұрын
I love how they made all the Identity razor components now, only thing missing is making this a PWA (progressive web application) so I can have one code base for the web & then submit to all the app stores, is it possible to add PWA? or would a different variety of template be needed?
@RiversJ11 ай бұрын
The WebAssembly Standalone app has PWA support
@adam-xt8te7 ай бұрын
4:43 Patrick, do you know why MS removed Authentication Type: Individual Accounts from final release .NET8? Add->New Scaffolded Item also doesn't have Identity position.
@nightraid6322Ай бұрын
I was wanting a guide from scratch, like what is usually done in other tutorials 😕I hope we get one soon
@TheVentureaaron7 ай бұрын
Good tutorial. Thanks!
@hasanalmontaser88982 ай бұрын
could you please add video about .NET 8 integrated windows authentication
@rpreviato11 ай бұрын
There is something I would like to see you discuss that is how to make the login and registration pages use a specific layout, different from the default main layout. I managed to do that, but I would like to see someone implementing that too, to see if the way I did it is right or not.
@АлександрКугай-в2тАй бұрын
It`s greate!!! Thank you very much!!!
@PatrickGodАй бұрын
Glad you like it!
@Mec2005 Жыл бұрын
Great video Patrick. Is in azure an Identity SAAS that we could customize like you did? The great question is, could I delegate the Identity management to azure and mind my on business? If it is possible, could you teach us?
@FrankTank77779 ай бұрын
Thanks Patrick, great info for early adopters. Just a question, do you have more info on cookies vs. tokens?
@zakustolondoo11 ай бұрын
thanks. very educational
@PatrickGod11 ай бұрын
Glad it was helpful!
@khayolnoranjov918 Жыл бұрын
It would be a great idea to create a video showcasing an application with multiple roles.
@margosdesarian Жыл бұрын
Hi Patrick, great video - however ....... could you do a video where the Login management is delegated to Okta or one of the other OpenId Connect providers, while still using the local Identity paradigm for role management, custom details, etc? That would be epic!
@Rhess972 Жыл бұрын
I am interested in AWS Cognito Self Hosted login pages with Blazor server/client
@scottmcnitt4354 Жыл бұрын
I also must use AWS Cognito (or our corporate idp which we currently federate to in Cognito) and am looking for examples.
@silentwindstudio10 ай бұрын
I'm using the Server Interactive type and I want to implement roles, but there is no Userinfo.cs file in the folder, any idea how to proceed? Edit: Already solved, all you need is to create the role in the DB as showed in the video, then skip directly to use it in your pages.
@llllSDllll22 күн бұрын
Hi, could you please create a tutorial on building a Blazor WebAssembly Standalone application with authentication via Azure AD B2C?
@jamesdwfrost Жыл бұрын
Another great video. Apply Migrations seems to work for me in the .net8 GA version.
@shaikyousuf51593 ай бұрын
@patrick Sorry for late you missed the ; on line 67 🤣 Subscribed
@PatrickGod3 ай бұрын
Thank you so much! 😅
@DigitalNomadOnFIRE Жыл бұрын
The exact video I wanted awesome…
@goolom Жыл бұрын
Does anyone have any idea why it 'auto-added' Tony Stark at approximately the 11:20 mark?
@bgrant151210 ай бұрын
Please , Please do a video on how to get back the Windows Authentication the wonderful devs at Microsoft left out. Since the inception of ASP you have been able to select Windows authentication and have the Hello logged in user display. They just took the checkbox out and haven't given any working instructions on how to add it back. Some of use are still on IIS and need to be able to access the logged in user.
@Punchatori9 ай бұрын
I'm looking for this too. I'd like to actually do windows authentication but use identity for the authorization and the roles. Ideally only an admin user can register new users.
@KleineDrehmomente Жыл бұрын
First, thank you for this great tutorial. I had my solution running instant upon your guidance. For me, as a developer with the scope on business solutions... What do you think, how secure are the automated identity features?
@PatrickGod Жыл бұрын
Thanks so much for the positive feedback! I'm glad to hear the tutorial helped you get up and running quickly. Regarding your question about Identity, it's generally quite robust. It's built on industry-standard protocols and practices, ensuring a strong security foundation. However, the key to maximizing security lies in correct implementation and regular updates. It's crucial to stay updated with the latest security patches and to follow best practices for configuration. Hope this helps!
@dennycrane29382 ай бұрын
Really need one for blazor 8+ with 3rd party oidc that works in mixed mode.
@valghirenghir37919 ай бұрын
Hi (1st, sorry for my bad english level) Your tutorials are good, with enougth explanation. Just 2 things (you speak to fast to me) and It seems the solution pattern/template have changed since you created this tuto. v8.0.2
@the.risprocess4 ай бұрын
great video as always! can you make a video of a Login page with a button loader while using this? im having problem with loader trying this. Thank you!
@sushant-um6iv3 ай бұрын
For those of us using VS Code instead of VS, is there a way to get Identity out of the box during 'dotnet new ..' or through a scaffolder using dotnet aspnet-codegenerator identity? The latter still creates the Razor pages identity UI not the blazor one.
@bertievision9 ай бұрын
Hi Patrick, great video thanks. Quick question. What if you are using multiple roles.. ? Will it work to just use List ? or List? Thanks..👍
@faridulhuk1248 Жыл бұрын
Hi very nice explaination. is it possible to add user with more roles like Admin and Manager, etc. is possible to show or hide component based on role. , please explain in detail and show us how to assign those roles after login.
@danielz750410 ай бұрын
You have to modify the mentioned files around 40:00 to handle multiple roles. Example: UserInfo.cs: public required IEnumerable Roles { get; set; } PersistingRevalidatingAuthenticationStateProvider.cs: var roles = principal.FindAll(options.ClaimsIdentity.RoleClaimType).Select(r => r.Value); PersistentAuthenticationStateProvider.cs: Claim[] claims = [ new Claim(ClaimTypes.NameIdentifier, userInfo.UserId), new Claim(ClaimTypes.Name, userInfo.Email), new Claim(ClaimTypes.Email, userInfo.Email)]; claims.AddRange(userInfo.Roles.Select(r => new Claim(ClaimTypes.Role, r))); If you wand to have users with hierarchic roles, consider using policies. Excellent article about this: chrissainty.com/securing-your-blazor-apps-configuring-policy-based-authorization-with-blazor/
@NotoriousDriver5 ай бұрын
Hey, can you help with generating the QR code for the 2fa and sending confirmation emails?
@DheiGxux10 ай бұрын
Can you explain how implement a gRPC with blazor if the gRPC is in the same .sln, Thanks!
@ChefOtang5 ай бұрын
Thank you
@CalvinMasindi7 ай бұрын
Hi Patrick, How do I go about using MainLayout for everything else except for Login and register page, how do I define that at rote level. When redirecting to login, how to tell the application not to use MainLayout view?
@wellington18m Жыл бұрын
Hello there, Thanks a lot for your content it is really helpful. I wanted to know if you have any full project using the new Blazor web app template and database first approach or if you plan to make a tutorial like this soon. Thanks for you help again.
@ChuckGiddens10 ай бұрын
Do you have any guidance on using CosmosDB as the EF Db Context?
@ilFusta8 ай бұрын
Great video, very informative, Tank you! What if I have to use a custom user table coming from a legacy projects should I rewrite the whole authentication and create a custom one or is there a way to override just few classes?
@abdeslamhidan5814 Жыл бұрын
How can we implement Authentication using AD B2C in a .NET 8.0 Blazor Web App?
@LuisSanchez-sy4rp9 ай бұрын
Susbcribed. Thank Patrick
@Alex-po3rr9 ай бұрын
If you use interactive server mode on a razor page, UserManager is not supposed to be used on razor pages as it is not thread-safe. Looking at the UserAccesor coded you have there, wouldn't that cause dbcontext issues? How is it possible to get the customised IdentityUser on a razor page when you can't use UserManager? I have tried using the directive @inherits OwningComponentBase and then calling Service.GetUserAsync but that still throw context error randomly. I just can't work out how to get the IdentityUser safely on a razor page so I can access all their details not just their user name.
@nandotox13 Жыл бұрын
Great video , can you show us how to extend the app to manage / edit users and assign roles . thanks great work .
@AminAM-c3h9 ай бұрын
thanks .. i have problem how can i use google recaptcha with login and register form here because i cant use interactive server mode or webassembly here in register and login component or form
@Cyphebreux1610 ай бұрын
Great video, thanks a lot 😎 Could be really interesting to make a video about how to deploy that app with SQL and Entity Framework Core on Azure though 🧐 I know for a fact it's not straight forward 😂
@sandroriz Жыл бұрын
UserAccessor in RTM is renamed IdentityUserAccessor and its method GetRequiredUserAsync wants a HttpContext as parameter. So how to use in a blazor server page where IHttpContextAccessor should not be used for Blazor apps?
@2Clairvoyance7 ай бұрын
Thanks for the videos. Can you do a video on .net 8 Blazor web app with Entra-ID?
@DavidMartin-vs1dm Жыл бұрын
Can this work with MongoDB?
@Mroosskkaarr88 Жыл бұрын
i have 2 projects and 1 library in my solution. I didn't implement authentication when i started it and im gonna retroactivly scaffold identityuser. my library is filled with my dtos where both my frontend and backend has a reference to. how would i implement all the identity functions into my blazor since i've done it retroactivly?
@beguede026 ай бұрын
Very good! Do you have example code in git? I wanted to see the file 'PersistingRevalidatingAuthenticationStateProvider.cs'. Thanks.
@alfonsdeda8912 Жыл бұрын
Thanks for video! How can I migrate the old aspnetcore.identity in existing blazor server project to new one blazor project with new authentication mode in .bet 8?
@user-fqlt Жыл бұрын
I'm having a lots of troubles with that.
@Fabius496 Жыл бұрын
I´ve created a new Blazor Web App solution (maintaining all the namespaces etc the same) and copied all my pages to the new project. With some smaller adjustments it works, but the new identity pages are still very buggy. e.g. my application runs globally in server rendermode, but the identity pages are static and you get a null exception. Known bug which should be fixed with the next release, but for me, I will wait quite a few time until .NET 8 gets some fixes. In my opinion it´s not production ready.
@user-fqlt Жыл бұрын
@@Fabius496 Exact the same senario and the same thoughts as mine.
@user-fqlt Жыл бұрын
I kept my blazor.server.js script and upgrade all the package references to .net 8 that works but not the new blazor unified (blazor.web.js)
@Alex-po3rr Жыл бұрын
Honestly, create new project based off the new template "Blazor Web App", add identity at that point and then migrate all your code accross.....then prepare for bugs! lol
@programacion9848 ай бұрын
hello patrick, could you make the same video but without identity? in net 8 custom authentication has errors, but not in net 7
@aog.tr.682810 ай бұрын
Thanks for this useful video. I have a question. If we enable InteractiveServer mode in standart identity template then all Account pages (Login, Register, ...) refreshing in a loop and doesn't working as expected. I think it is a bug. Can you please give some ideas to solve it. Thanks.
@kodilda61378 ай бұрын
Nice!
@luisfernandodeolazabalsche33177 ай бұрын
Gracias.
@dulist781711 ай бұрын
Thanks for the tutorial! I'm new to blazor and whenever i tried to update database, it's always throw an error said "Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'startIndex')" How can i fix this error?
@junaidkhanvibes-jkv721410 ай бұрын
Nice , could you please make a detail video on configuring indexedDB in your blazor project and aslo authentication and autherization in indexedDb , Please do it if you can 💌
@BeOriiGiinaL9 ай бұрын
Hello Patrick, thank you for the great content. I have a consern about the default architecture of a blazor project with identity. Is it safe or appropriate to access database directly from the frontend project without having an API layer in between?
@DevBeginnerU11 ай бұрын
I can do something similar for a Maui app ?
@Locxion11 ай бұрын
Hey Patrick! It would be really helpfull if you could make a Video about Identity and MySql Connetions with Pomelo? Ive tried and failed. I primarly use MySql Databases and want to integrate a Blazor Project into my existing Database Structure. Love your .Net Content! Thanks in Advance
@TravelandTalkwithMansoor7 ай бұрын
Hi patrick, have request can you please create video with permission to access blazor app on based of logged in user from windows and also get roles defined in active directory. would be grateful for that
@uspaget Жыл бұрын
how can we do this without Windows ? Eg MacOs + VSCode also, is it possible to use something like azure cosmos or mongodb instead of sql ?
@sebastian.cardozo8 ай бұрын
Thank you very much for your videos, I am facing a problem :( .I need MainLayout to be interactive, it works correctly until I use the "Account" pages, it is because they need a HttpContext and lose interactivity (This is explained in AccountLayout). How can I keep the interactivity of MainLayout? Can you help me please?
@bonaoenchelcha4 ай бұрын
Did you solve the problem ?
@sebastian.cardozo4 ай бұрын
@@bonaoenchelcha mmmm I Only use Blazor Webassembly (one project) with API for the Authentication with localStorage. NetCode-Hub videos helped me. Sorry for My English
@jportugal1008 ай бұрын
I'm having an issue where all the account pages just keep reloading constantly. Any ideas?
@Techide Жыл бұрын
First of all, nicely explained. When I create a project with the new template (the Web App, not the Web App Blank) and run it after migrations, all I get is the 'Hello World' page. I never get rerouted to the login page. Anyone have an idea as to why?
@forestmanzpedia Жыл бұрын
Unfortunately, nothing what you provided works and I am stuck at 10:40 "A network-related or instance-specific error occurred while establishing a connection to SQL Server.". I dont even have the same file structure like you have in the Solution explorer. I did the same you did when creating this project. For example, I dont have the /Identity of nor the /Extension directories with their own files which are all displayed in your solution explorer. Would be nice if you plan beforehand what could potentially and two do those types of videos when Dotnet is not in a preview release. I want a hassle free tutorial because I am learning Blazor development and start from scratch when it comes to Authentication, Token and authorization. I dont want to waste my googling 8 hours around solving the issues I have right now. I will have to look elsewhere. I have nothing but problems with your other video ".NET 8 Authentication with Identity in a Web API with Bearer Tokens & Cookies". I run into issues and the video does not explain me anything.
@calmhorizons11 ай бұрын
If you don't want to spend 8 hours googling about a problem you can't solve then I recommend you give up on being a developer. This isn't a career where things work out of the box or solutions are spoon fed to you. Also, this is a free KZbin video not a personal tutor. You get what you pay for.
@maji___10 ай бұрын
No need to be a jackass@@calmhorizons
@amusefly5 ай бұрын
is is essential for me
@broadshare Жыл бұрын
Thank you Patrick, how can we change the id column of applicationuser to int PK instead of the guide type?
@onman999 Жыл бұрын
Declare your user class like this: public class ApplicationUser : IdentityUser { } Or replace the int32 type for any type you'd like to use. Of course you need to use a type that is compatible to a database type.
@alecmatias4774 Жыл бұрын
Thanks for your videos. I'm new with blazor and am looking for some tutorials about how to authenticate blazor using bearer token using the new net 8 web identity api endpoints. I hope you can do some tutorials about that.
@waynehawkins654 Жыл бұрын
Nice but what about API for security. Is it ok to work this way being they are Razor page, or is this a no-no and we should be doing API calls. What about Blazor MAUI in .net8?
@liam21618 ай бұрын
Been enjoying your .net 8 videos. One thing I am frustrated by is being able to authenticate and authorise using Microsoft identity web. Simple Entra apl with some simple app roles like "Create, Update, Delete" etc. I can authenticate using Entra no problems, but razor pages fail to work using [Authorize] attribute it's not seeing me as authorised or the roles. This is blazor web app for dotnet 8, all server side no client. I just want Entra app to authenticate and authorise my users not the application, but completely stuck. Thanks for sharing this great content.
@KarineKirakosyan-zo3pv8 ай бұрын
Hello. Thanks for the great videos. I will appreciate it if you can give me direction as I am new in blazor. I have Blazore web app with Interactive Auto render mode and I have an external web api with api route to authenticate which returns a JWToken. My goal is to authenticate in Blazor using that token, and I'm stuck saving the user's logged data to storage.
@evgeniilewicki58746 ай бұрын
Thank you for the video. Now it will actually work with an error. should be written not like this @attribute [Authorize(Roles ="Admin")] , but like this @attribute [Authorize] And then you just add the Roles and nothing extra.
@chobo2 Жыл бұрын
What happened to the other authentication types like "Windows"?
@IcemanTPG Жыл бұрын
Why are there pages in both the client and in the backend
@JoshuaAndrea110 ай бұрын
It is organised in such a way that the pages in the client are client-side rendered, the pages in the backend are server-side rendered
@manojnaik56436 ай бұрын
Hi Patrick, need a critical help on my project regarding same type of integration, can you please help me out
@user-fqlt Жыл бұрын
This new Identity Server in .net 8 is not production ready for me. Too buggy.
@keyvankabirnia260910 ай бұрын
awesome
@allannielsen47528 ай бұрын
Any chance anyone here know how to add Entra support instead of Individual accounts?
@sajankumarvijayan811 Жыл бұрын
@Patrick God, is it possible to use Mongodb EF core?
@user-fqlt Жыл бұрын
Yes it is possible.
@technext4855 Жыл бұрын
Always Microsoft releases half built project. Why can't we customise Identity Api Endpoints?
@piyushchoudhary13169 ай бұрын
Can please you make .net 8 asp net core hosted app with identity using JWTs, if you already have one could you reply with link please?
@sinanfen7 ай бұрын
I need the source code of this content 😔
@adam-xt8te11 ай бұрын
Tip: Role "ADMIN" and role "Admin" are two different roles.
@DigitalNomadOnFIRE Жыл бұрын
Please provide a repo
@michaelchristensen83509 ай бұрын
They changed the template so it now looks different. Real shame for new people, its pretty hard to understand what is going on when everything is different. You video is very good though.
@leroylimll11 ай бұрын
Excellent video. Is there a guide to setup Blazor .NET 8 with Azure B2C? Please advise.