[Full Course] | .NET 8 Clean Architecture with Blazor Wasm CRUD, JWT & Role Auth, Identity manager🔥

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 เม.ย. 2024
  • Are you looking for Coding Mentoring? If you're seeking personalized guidance and mentoring for your coding journey, then get in touch!. I offer expert guidance and support to help you level up your programming skills. Contact me on business.netcodehub@gmail.com to book a session and accelerate your coding career.
    Overview
    🔹CRUD
    🔹WT Authentication
    🔹Role-based Authorization,
    🔹Refresh Token,
    🔹Identity Manager
    /*Grab complete source code*/
    🔹www.buymeacoffee.com/netcodeh...
    /*Playlist*/
    🔹 • .NET 8 | 🚀Ultimate Gui...
    /*Related*/
    Securing Your .NET 8 Blazor Interactive Server : Policy-Based Authorization with Identity Manager 🔥🎇 • [Full Course] | .NET 8...
    .NET 8 QuickGrid: Effortless Add, Update, Delete, Filter, Sort & Paginate - No More External Library • .NET 8 QuickGrid: Effo...
    Securing .NET 8 Clean Architecture with JWT Authentication : Best Practices and Implementation🔥🎇. • Part 1️⃣ | Implement J...
    Complete .NET 8 Clean Architecture with MediatR and CQRS with CRUD using Web API & Blazor Wasm. • [Full Course] | .NET 8...
    Mastering .NET 8 Clean Architecture: Implementing MediatR & CQRS for CRUD Operations -Wasm & Web API • Part2️⃣| .NET 8 Blazor...
    Here's a follow-up section to encourage engagement and support for Netcode-Hub:
    🌟 Get in touch with Netcode-Hub! 📫
    🔹 GitHub: (github.com/Netcode-Hub) 🌐
    🔹 Twitter: ( / netcodehub ) 🐦
    🔹 Facebook: ( / netcodehub ) 📘
    🔹 LinkedIn: ( / netcode-hub-90b188258 ) 🔗
    🔹 Email: [business.netcodehub@gmail.com]📧
    ☕️ If you've found value in Netcode-Hub's work, consider supporting the channel with a coffee!
    🔹Buy Me a Coffee: (www.buymeacoffee.com/NetcodeHub) ☕️

ความคิดเห็น • 111

  • @cherifdiallo5592
    @cherifdiallo5592 หลายเดือนก่อน +1

    First of all thank you for all our good work!

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน

      It’s my pleasure

  • @akosimarcoantonio
    @akosimarcoantonio 3 หลายเดือนก่อน +2

    Thank you this help me a lot

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      😃

    • @viosity9707
      @viosity9707 หลายเดือนก่อน

      @@Netcode-Hub I would like to buy this project, but I have a question: how many database classes does it have?

  • @nadimkhan-zh4yr
    @nadimkhan-zh4yr 2 หลายเดือนก่อน

    Thanks for your contribution. I have one question in my mind blazor job market.

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      😂 what question

  • @goditto5694
    @goditto5694 3 หลายเดือนก่อน

    @24:23 I have noticed that no more blazor 8 projects don't have 'useauthentication, useauthorization' code part in any type of rendermode projects. but you put those 2 lines. may I know what differences here? (and also you used 'addauthentication' twice at time @24:23 )

  • @mikekearl2416
    @mikekearl2416 3 หลายเดือนก่อน

    I have been though this a couple of times and I dont see you update code for the following :
    Should be between 30:56 and 52.18
    public Task CreateRoleAsync(CreateAccountDTO model)
    {
    throw new NotImplementedException();
    }

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน +1

      Hy , it was implemented lately , kindly check again , 😃

  • @lukevincent4397
    @lukevincent4397 3 หลายเดือนก่อน

    In your demo's can you please change the component suite? No one really uses the stock standard menu. Mudblazor or Radzen would be a great choice.

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      Is open to modification so you can do so

    • @lukevincent4397
      @lukevincent4397 3 หลายเดือนก่อน

      ​@@Netcode-HubBut try integrate identity with these frameworks, it's not easy and you the expert 😂

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน +1

      😆, try your hands on, will be available to assist you .

  • @hoangthanh6994
    @hoangthanh6994 3 หลายเดือนก่อน

    I have a case, blazor hang until browser change from loadding state to complete state when frist launch, in project starter created by visual studio, In Home component, which is launch first, , when I override OnInitializedAsync and add Task.Delay 30 seconds, blazor hang 30s utils, in this time, I can't click in another component, on function is hang utils 30s success, browser change state from loadding to complete, blazor begin work perfectly

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      Don’t use task.delay in onintialized method, thus the entry starting point , you can use task.delay in button clicked and other operations but not page lifecycles. If this sound weird to you , you can mail me for extensive explanation. 😆 hope this helps

  • @gr8fasushi
    @gr8fasushi 3 หลายเดือนก่อน +1

    at timestamp 26:50 you ran update-database, that command gives me an error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server). I run into this same error in the last 3 blazor demos of yours at this step. What prerequisite am I missing?

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      Sorry for having such error, do you have MySQL installed ?

    • @alexandredumont1230
      @alexandredumont1230 2 หลายเดือนก่อน

      @@Netcode-Hub In which layer do I place this dependency?

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      @alexandredumont1230 please I don’t understand the dependencies you are talking about . Throw more light on it

  • @rachidbariz7168
    @rachidbariz7168 3 หลายเดือนก่อน

    Thank you very much sir
    Once loggedin, i want to access userid accross all authorized pages in the application. how can I access ?

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      Retrieve the Id from user claims

  • @Redman11000
    @Redman11000 2 หลายเดือนก่อน

    Thanks for the video. One question, at minute 52:21 on line 94, should not be "if (!string.IsNullOrEmpty(response))"?

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Thanks for your comment, why do you think it should be such ?

    • @Redman11000
      @Redman11000 2 หลายเดือนก่อน

      @@Netcode-Hub Because the variable that is receiving the possible list of errors is response and not errors. 😀

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      @Redman11000 😃

  • @mohammadfekri4987
    @mohammadfekri4987 หลายเดือนก่อน

    nice video

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน

      Thanks 😊

  • @manhalshiha
    @manhalshiha หลายเดือนก่อน

    Some operations were not shown in the video, such as display confirmation box for delete and update

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน

      Take your time and go through , everything is visible

  • @sebastiancardozo4971
    @sebastiancardozo4971 2 หลายเดือนก่อน

    Thank you very much for your videos, no blackfriday discount? :p

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Haha 😂 mail me

  • @learncomputerprogrammingin4884
    @learncomputerprogrammingin4884 2 หลายเดือนก่อน

    Hello. Is it a good practice to reference the Application layer in a WebUI project?

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน +1

      Yes 👍

  • @matteoantonini3102
    @matteoantonini3102 2 หลายเดือนก่อน

    Hi, I have a question.
    At minute 1:13:08 you remove the GetRolesAsync method from the IAccountService interface, but at minute 1:45:17 you use the GetRolesAsync method in the RegisterPage. I don't understand why you took it off first and then uses it. I tried, but it gives me an error. It tells me "MethodNotAllowed". Can you give me a hand?
    Thanks a lot

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      You need to select role when registering thus why we need to call get roles async

    • @matteoantonini3102
      @matteoantonini3102 2 หลายเดือนก่อน

      @@Netcode-Hub I understand. but my question is: why did you remove GetRolesAsync from IAccountService? To then use it in the RegisterPage. I don't understand this passage

  • @CompTechnology
    @CompTechnology 2 หลายเดือนก่อน

    ur doing verry well if i want to use two layout one for public and one for logedin user how can i do

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Create razor page , import from layout component base
      Thus all
      To reference it
      Use @layout nameOfLayout
      Check this project for practical example
      Complete Inventory Management System with .NET 8 Blazor - CRUD, Export to PDF, EXCEL, Print, etc...
      th-cam.com/video/KoGJsjnKmj0/w-d-xo.html

  • @samkimmel4643
    @samkimmel4643 หลายเดือนก่อน

    Do people using Visual Studio really manually add packages to their project files? Why not use NuGet?

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน

      Hy, sorry for your question. I am bit confused. Kindly throw more light to it

  • @dominiksteficar6341
    @dominiksteficar6341 2 หลายเดือนก่อน

    Hey, i'm trying to learn the principal of clean arhitecture, is there a point why you placed some services in the Services folder and others in the Extensions folder? Because most of them are more services than extensions, they don't exactly extend any existing class.

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Are you taking about identity user class extension? The reason I did that was the dual usage . We need that class both in infrastructure and UI thus Blazor

    • @dominiksteficar6341
      @dominiksteficar6341 2 หลายเดือนก่อน

      @@Netcode-Hub Im talking about Application class library. You have a map called Extensions and map called Services. You placed account service in Services, but you placed HttpClientService and LocalStorageService in Extensions folder. I'm asking what was the reason why all services are not placed in the same root folder called Services, but rather placed in Extensions. I'm just trying to understand your principles so I can apply them properly

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      @dominiksteficar6341 no actual reason for this, organization differs , it’s good to put all services in a one place for easily identification. Httpclientservice … are extension /service . So it’s not mandatory to do that. Hope this little explanation helps. 😃

  • @2005Azm
    @2005Azm 2 หลายเดือนก่อน

    Great tutorial!!
    by the way I am getting "The ConnectionString property has not been initialized"
    When I run PM> update-database

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Thanks 😊
      Kindly check your connection string wether it has all the necessary sections and service registration.

    • @2005Azm
      @2005Azm 2 หลายเดือนก่อน

      @@Netcode-Hub ok thank you, I'm redoing that section

    • @2005Azm
      @2005Azm 2 หลายเดือนก่อน

      I'been working on this for days!.... Not easy to follow..

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      @2005Azm thus great, I belief you are not facing any issues ? 😂

  • @viosity9707
    @viosity9707 หลายเดือนก่อน

    Does anyone know how many database classes there are? and are there one-to-many relationships?

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน

      Kindly go through the video.

  • @elijah5176
    @elijah5176 3 หลายเดือนก่อน +1

    Can you do .NET 8 clean architecture CRUD with JWT authentication and authorisation in web API only. Just API with Swagger UI?

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      This video has it

    • @elijah5176
      @elijah5176 3 หลายเดือนก่อน

      @@Netcode-Hub Okay, thank you

  • @waynehawkins654
    @waynehawkins654 2 หลายเดือนก่อน

    Questions?
    What if a users log in and say has full admin rights. I then go and remove this rights. Will they not still have full rights. That is how do I force a remove of the JWT so they have to then sign in again.
    Question 2? What if I want to assigned more then one role? How can I check if they are in any role and based on this allow in parts of the web project

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      You can use signalR to notify the client and call a method to clear the LocalStorage or where ever the token is and call nav.navigateTo()

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Then use claim-based authorization

    • @waynehawkins654
      @waynehawkins654 2 หลายเดือนก่อน

      @@Netcode-Hub are we not already using claim-based authorization in this video? If not, do you have a URL link that shows this.

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      @waynehawkins654 assign multiple roles to user using
      await _userManager.AddToRoleAsync(user, "Admin");
      await _userManager.AddToRoleAsync(user, "Doctor");
      await _userManager.AddToRoleAsync(user, "Patient");

    • @waynehawkins654
      @waynehawkins654 หลายเดือนก่อน

      @@Netcode-Hub I paid for the code. If I am to build my project into something using your NetcodeHub, can I also get the source code for this? Happy to pay for it
      By the way, a download of this project has a error for the @inject ToastService toastService.

  • @waynehawkins654
    @waynehawkins654 2 หลายเดือนก่อน

    My browser show the store token. But if I close my Edge browser that stops the project running, and then re-run. The token has been lost so I have to sign in again. What am I missing? Like Visual Studio is starting fresh on each build

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Try chrome to see.if persists, push to GitHub and send me link to review

    • @waynehawkins654
      @waynehawkins654 2 หลายเดือนก่อน

      @@Netcode-Hub Will do but this code is a big 18 project solution with 2 years in the making so I cannot send the whole code.

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      @waynehawkins654 wow 🤩 Ohk

  • @Redman11000
    @Redman11000 2 หลายเดือนก่อน

    I continue to review his code and find at 1:26:46 that injects a ToastService service into the WebUI Program, but that property does not exist in the namespace, can yo tell me why?

    • @Redman11000
      @Redman11000 2 หลายเดือนก่อน +1

      I see that version 1.0.1 of your Toast Namespace does have it, but version 1.0.4. No, Why?

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Have updated the package, please use the version used in this video . Will update you with the latest version.

    • @Poeisible
      @Poeisible หลายเดือนก่อน

      @@Redman11000 I have the same problem. What's solution?

  • @viosity9707
    @viosity9707 หลายเดือนก่อน

    I would like to buy this project, but I have a question: how many database classes does it have?

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน +1

      Hy, before you buy , kindly go through this video, I made explanation to everything. You will know everything before purchasing.

    • @viosity9707
      @viosity9707 หลายเดือนก่อน

      @@Netcode-Hub Could you describe it to me here or by e-mail? my english is not that good :(

  • @abdusuf523
    @abdusuf523 3 หลายเดือนก่อน

    Please add tutorial for adding permission based authentication in a clean way

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน +1

      Check the playlist , have done that already

  • @mrt7948
    @mrt7948 3 หลายเดือนก่อน +1

    Thank you very much sir. Is the source code available?

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน +1

      Kindly check the video description

    • @mrt7948
      @mrt7948 3 หลายเดือนก่อน

      @@Netcode-Hub i am looking for async Task ConfirmDelete() . any one can help please?

    • @safayethossain5746
      @safayethossain5746 2 หลายเดือนก่อน

      @@Netcode-Hub This link is not this project's source code.

  • @juliochan10
    @juliochan10 หลายเดือนก่อน

    Identity in the domain layer?

    • @Netcode-Hub
      @Netcode-Hub  29 วันที่ผ่านมา

      D you have any issue with that?

  • @waynehawkins654
    @waynehawkins654 3 หลายเดือนก่อน

    Hi, before I buy a coffee for the code. I see a comment below that it's not current. Can you confirm?

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      Which one are you talking about?

    • @waynehawkins654
      @waynehawkins654 3 หลายเดือนก่อน

      @@Netcode-Hub Not sure. I just got the code anyway. Happy coding.

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      @@waynehawkins654 sure, great. If anything, just mail me, thanks. Enjoy

    • @waynehawkins654
      @waynehawkins654 3 หลายเดือนก่อน

      @@Netcode-Hub Your code, worried as I don't have control and any problems in the future I cannot fix. Do you have the source code of your add-ins so I can work with future problems if you stop supporting?

  • @safayethossain5746
    @safayethossain5746 2 หลายเดือนก่อน

    could you please gimme
    the Repository link bro?

    • @Netcode-Hub
      @Netcode-Hub  2 หลายเดือนก่อน

      Kindly check the video description

    • @safayethossain5746
      @safayethossain5746 2 หลายเดือนก่อน

      @@Netcode-Hub is it paid ?

  • @cherifdiallo5592
    @cherifdiallo5592 หลายเดือนก่อน

    but I have an issue with the following line of code : var response = await privateClient.GetAsync(Constant.GetRolesRoute); It says that Task does not cointain a definition for GetAsync

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน

      Make sure your private client return an instance of httpclient

    • @cherifdiallo5592
      @cherifdiallo5592 หลายเดือนก่อน

      @@Netcode-Hub in the Application.Extensions.HttpClientService class the function is defined as this : public async Task GetPrivateClient(). I'm doing something wrong?

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน

      No if the method return HttpClient. Debug this method and make sure token is added to the header.

  • @wokoalex4658
    @wokoalex4658 หลายเดือนก่อน

    how do i resolve this "Error: One or more errors occurred. (Cannot provide a value for property 'AuthStateProvider' on type 'Demo.WebUI.App'. There is no registered service of type 'Application.Extensions.CustomAuthenticationStateProvider'.)
    at Jn (marshal-to-js.ts:349:18)
    at Tl (marshal-to-js.ts:306:28)
    at 00b2193a:0x1fa90
    at 00b2193a:0x1bf5b
    at 00b2193a:0xf142
    at 00b2193a:0x1e7aa
    at 00b2193a:0x1efa0
    at 00b2193a:0xcfbc
    at 00b2193a:0x44130
    at e. (cwraps.ts:338:24)"

    • @Netcode-Hub
      @Netcode-Hub  หลายเดือนก่อน

      You haven’t created dependency injection with the authentication state provider. Do that in the Program.cs class

  • @MihaiMoisei
    @MihaiMoisei 3 หลายเดือนก่อน

    Thanks a lot. Microsoft.AspNetCore.Identity is deprecated , are any other solution ?

    • @Netcode-Hub
      @Netcode-Hub  3 หลายเดือนก่อน

      Will find out

    • @flobuilds
      @flobuilds 3 หลายเดือนก่อน +1

      A really good alternativ would be identity server. This can be combined with blazor but takes over the complete handling of account features. It is a fully featured sso service and supports oidc/oauth2. Can be run completly seperate or included in the same codebase. You can also edit all the needed pages for it.

    • @bocarmg3832
      @bocarmg3832 3 หลายเดือนก่อน

      It's only the package not the functionality