🔒 Identity with a .NET 6 Web API & Blazor WebAssembly

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025

Комментарии • 62

  • @YuzzyBee
    @YuzzyBee 2 года назад +20

    A complete tutorial with Blazor, Oauth and Roles would be really amazing because authentication and authorization are quite complicated at the beginning but almost indispensable for every project.
    Thank you so much Patrick !

  • @FredHendrix
    @FredHendrix 2 года назад +4

    It is like you are in my head - I was thinking about using MS Identity with Blazor and you alert popped up. You have supernatural insight.

  • @bowend01
    @bowend01 2 года назад +2

    This is pure gold! I've been beating my head on the desk trying to figure out this type of authentication and this is a concrete, pragmatic description of this process and gets me exactly what I need. Thanks so much!

    • @PatrickGod
      @PatrickGod  2 года назад

      Thank you so much for your feedback, Doug. Glad I could help! 😊

  • @ranjisnnirma7
    @ranjisnnirma7 10 месяцев назад

    Thank you patrik sir, we will would much appreciate your help

  • @Artmageddon
    @Artmageddon 2 года назад +1

    OMG I've been so eager to learn about this! Was looking at other tutorials and was getting super confused going through it so I can't wait to see this!

  • @Duelweb
    @Duelweb 2 года назад +1

    Am working on this right now, could not have come at a better time! Thank you.

  • @rdagger
    @rdagger 2 года назад +3

    Thanks for the great tutorials! I appreciate how much time and work you must spend making them. At 5:57 in the video a readme appears that suggests licensing may be required. I followed the link and it looks like many businesses would need a rather expensive yearly license from Duende to use this authentication.

  • @joe77s
    @joe77s 2 года назад +2

    Thanks, this is great as usual.

  • @ricardothomas3779
    @ricardothomas3779 2 года назад +4

    Patrick you are awesome!
    Thank you for the content you share with your viewers. I/We are learning a lot.
    Security/Identity is one of the main areas I want to understand and get right for all my projects.
    I purchased your "Authentication & Authorization in . NET 6 with JSON Web Tokens (JWT), Refresh Tokens & Roles" course and I learnt a whole lot.
    The question I have is, how can I do the same thing in that course using Active Directory on-premises?
    Since Active Directory would has all users, how do I authenticate users via Active Directory on-premises to generate Access Tokens, Refresh Tokens, with claims and roles info to secure the resources ?

  • @digitaldaridesatv1545
    @digitaldaridesatv1545 2 года назад

    Thank you Patrick!

  • @PedalsizBerkay
    @PedalsizBerkay Год назад

    THANKS GOD !!!!!!!!!!!

  • @EidurMoller
    @EidurMoller Год назад

    Why do you create the SuperHero class in the shared folder and not the Models folder in Server ?

  • @10Totti
    @10Totti 2 года назад +1

    Great was a video I wanted to ask you :)

  • @fridayman99
    @fridayman99 Год назад +1

    Great video, Patrick! This stuff's non-trivial and you explain it so well. Do you mind doing a similar video, combining Identity + Blazor WebAssembly + JWT tokens? It can build on this video. Thanks again!

  • @bayesdiarra3900
    @bayesdiarra3900 2 года назад +2

    Great tutorial!!!! can you please do one the complete Identity authentication with roles?

  • @leonardojosevargashernande1937

    Hello Patrick, thanks for the class, I've a doubt, if I need that de principal page of project will be /Identity/Account/Login, how can I do this? I don't want that the principal page will be index.html, however if the user is authenticated must redirect to index.html.

  • @remixowlz
    @remixowlz Год назад

    thank you really helpful

  • @ryantunis7465
    @ryantunis7465 2 года назад

    Super helpful tips on the scaffolding in this video! I got stuck there but not anymore!
    Any chance you have a video that explains Social login providers (Google, Facebook, Microsoft) in a production environment? I have a situation where the redirect URL's work just fine locally but when deployed in an Azure App Service the redirects go to the correct pages "signin-google" (for example) but the WebAssembly app routes just pick it up as a "page not found" and the full authentication flow does not complete on the Server portion.

  • @remixowlz
    @remixowlz Год назад

    11:46 connection atabase

  • @shifuteamendurance
    @shifuteamendurance Год назад

    Hello, great tutorial as usual. thank you.
    I have a question about GDPR though.
    Do you know if as in your scenario, we're using JSON Web Tokens, we should do anything more to be GDPR compliant?

  • @ahmetturkoz9954
    @ahmetturkoz9954 Год назад

    thanks..

  • @lantisdylan
    @lantisdylan 2 года назад +1

    Sir can u make a blazor upload image save to database and save to folder

  • @comroec
    @comroec 2 года назад +1

    thanks

  • @10Totti
    @10Totti Год назад

    So if we use identity we can do without jwt right?

  • @LoneTaha
    @LoneTaha 2 года назад +1

    more videos of blazor pleaseeee

  • @amirameri1354
    @amirameri1354 Год назад

    Tank you for your nice video. But after all this, how to deploy website with blazor webassembly with host and individual account to external server? There are not any video or tutorial for this step.😢

  • @coder3123
    @coder3123 2 года назад

    is there a way to extend the Application user metadata using a one to one relationship? I want to keep the AspNetUsers table pure and add extra fields separately but when I try to do it the Add Migration does not create appropriate foreign key relationship, it puts the fk in AspNetUsers instead of putting users key in the new table.

  • @briantheitguy
    @briantheitguy 2 года назад

    I love your videos and I am learning a lot in just the last week. I do have a question though.. Where can I find instruction on getting more info (like First & Last name) from the Google or Facebook identity?

    • @bigggmoustache8868
      @bigggmoustache8868 Год назад

      If you add a breakpoint the validation you can dig through the object that the service returns. It probably varies a bit between whatever method you use, but I know it's not too hard to find in there. (sorry I'm new'ish and can't describe things well, but have used both google and facebook social sign-in methods and played with them a bit).

  • @callistusogu5036
    @callistusogu5036 2 года назад +1

    Please can you point me to a tutorial where .net 6 API with identity is taught. I don't want to use blazor I want use angular or rather someone else does frontend so I just want API that I can expose for the frontend engineer

  • @dotnetdevni
    @dotnetdevni 2 года назад

    Will this work within the confinds of blazor maui web assembly?

  • @samiryasser
    @samiryasser 2 года назад

    Can you tell how can I style scaffolded identity using css files in client site ?????

  • @chezchezchezchez
    @chezchezchezchez 2 года назад

    I’m making a server app, instead of the webassembly. all this apply to me too?

  • @tiagocandeias3969
    @tiagocandeias3969 2 года назад

    How can you disable the registration?

  • @coder3123
    @coder3123 2 года назад

    Do you have a tutorial on how to utilize .net password less auth and user registration for a .net api?

  • @witoldbarcinski813
    @witoldbarcinski813 2 года назад

    MultipleActiveResultSets=false in connection string was helpfull

  • @abdullahal-nahian
    @abdullahal-nahian 2 года назад

    Hi Patrick, I can't thank you enough for your videos. You have made my life easier. I'm facing a problem after scaffolding.
    A new ApplicationDbContext.cs file is created in Areas>Identity>Data>ApplicationDbContext.cs in addition to the existing Data>ApplicationDbContext.cs which is causing me headache.
    Can you please help me with this?
    PLEASE

  • @Denvercoder
    @Denvercoder 2 года назад +2

    The thing that bothers me is that all of these tutorials use SQL Server which is fine but try and deploy that. It will cost like $127/month for a cheap "DEV" SQL Server instance on Azure.
    You have one tutorial where you build a blog and you use Sqlite and I tried that but when I deployed the project it stopped working. I haven't been able to figure out how to deploy a Sqlite database on Azure.
    Could you please maybe make a short video where we can have:
    Blazor
    A cheap or free database that you show how to deploy and get it working?
    All I want to do is create a simple blog for myself and I'm not able to pay $100+/month to run it.
    I'm one of your supporters BTW ;)

    • @PatrickGod
      @PatrickGod  2 года назад +1

      Hey there,
      Thanks for reaching out. I haven't deployed SQLite to Azure, yet, but let me add this to my list. That said, have you thought about renting a Windows Server? Deploying a Blazor App there with SQL Server Express might be a better choice for you. I have a video about that here: ruclips.net/video/IkveZO9TZtU/видео.html
      Hope this helps!
      Take care,
      Patrick

    • @Denvercoder
      @Denvercoder 2 года назад

      @@PatrickGod I've been working with dotnet since 2003 but I have been doing React development for the past 6 years so my dotnet skills are a bit rusty and I'm a little stupid.
      The reason it didn't work is because the .db file didn't deploy.
      You have to go to Properties > Always Copy
      after doing that the .db file gets copied to the server.
      So now it works just fine.
      I am using the SQLite database but I had to use Microsoft Identity through Azure AD because I didn't know how to setup auth with the Sqlite database. Researching that now.
      For a simple blog it's nice not to have to pay for a database.

  • @MarioStaats
    @MarioStaats 2 года назад +2

    Great Video - but is it possible to use this without de license of duende? maybe a tutorial with openiddict or similar? *thubsUp for this Video

  • @NaniwaRocky
    @NaniwaRocky 2 года назад

    You look tired :D Keep up the great work! Waiting on a Hosted Blazor WASM with Microsoft Identity for Azure with implementation of roles etc.. would be nice! Thanks

  • @uzibiran285
    @uzibiran285 2 года назад

    Hello Patrick, I am interested in building a login API to use login from Blozer calinat, but I encounter a problem that all APIs are blocked before login. How can I solve this problem, and thanks in advance

  • @davidlyons24
    @davidlyons24 2 года назад

    I've been programing C# for almost 20 years for win apps with WinForms and then Webs in PHP and Laravel. I really love C# but this authentication system of Wasm Net Core it's a mess! Your tutorial it's great because it's the first one to show how to load User related entities. But net Core team should simplify it. For example in Laravel to get the user superheroes will be just a line of code. Anyway... I'll continue with this mess because of the multiplatform target :S

    • @flogginga_dead_horse4022
      @flogginga_dead_horse4022 2 года назад

      Have you ever made Laravel work in an Enterprise with Azure AD, Office 365 etc.? Probably not.

  • @m.ramadan
    @m.ramadan 2 года назад

    Mine Didn't work :( i am using VisualStudio for mac on my M1 mac mini , the generated project is using SqlLite instead of SQLServer and I couldn't apply the migration.

    • @davidlyons24
      @davidlyons24 2 года назад

      Normally that happens also when you create a project and change it to mysql for ex, that you have to delete the files in the migrations folder and then execute "dotnet ef migrations add InitialCreate" and "dotnet ef migrations add InitialCreate"

  • @dotnetdevni
    @dotnetdevni 2 года назад

    U listened to my last comment then thanks so much ;-)

  • @franciscoruiz7031
    @franciscoruiz7031 2 года назад

    Blazor + OAuth or something like that, thanksssss

  • @azgan123
    @azgan123 2 года назад

    Patrick. The JS community really sticks to firebase for small projects. How about a course on WASM + Firebase so I can learn how a pro does it?

  • @kicker8641
    @kicker8641 2 года назад

    I think Microsoft broke something, I started following the tutorial and when I got ot the scaffolding part and it keeps erroring, I thought I made some mistake, deleted the project and restarted same. Tried 3 different projects all failed with the same error *facepalm*

  • @k2an
    @k2an 2 года назад +1

    Please give up this scenario.. how many firm using identityframework ready-to-use scheme! please!

    • @michaelswells
      @michaelswells 2 года назад

      This is a great tutorial but I agree with Kaan. Most bigger companies provide authentication already (with SSO). You do not need to register an account but would request one or more roles, i.e., Program Manager (A), Program Manager(B), and Contract Manager (program C, contract 1). On the other hand, a website administrator would provision the role the user needs.

  • @torrvic1156
    @torrvic1156 Год назад

    Honestly your tutorial is counterintuitive. You didn’t started from the scratch. You just jumping from place to place. Hard to understand as to what is going on. And you are way too fast.

  • @kourosh234
    @kourosh234 Год назад

    When I debug the app I get an error, it says that it "Metadata file 'xxx.client.dll' could not be found". Anybody knows why?

  • @reidartho
    @reidartho 2 года назад

    When I use a connectionstring to the productionserver I get error 500 "connBlazor": "Data Source=xxx.xxx.xxx.xxx;Initial Catalog=dbBlazorIdentity;User ID=sa;Password=Secret;MultipleActiveResultSets=true"

  • @ceejayviii
    @ceejayviii 7 месяцев назад

    How to initialize it in vs code?