Custom Identity in Asp.Net Core MVC | Login and User Registration | .Net 8

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

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

  • @jeromecea7676
    @jeromecea7676 19 дней назад

    thanks, Im searching for this type of tutorial and not using scaffolding one
    thanks a lot!

    • @IAmUmair
      @IAmUmair  18 дней назад

      Glad it was helpful!

  • @RAJUDAS-lv6gc
    @RAJUDAS-lv6gc 7 месяцев назад

    I think you are really good teacher.....

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

      thanks for the complement

  • @besnikbrahimi5483
    @besnikbrahimi5483 3 дня назад

    Do you use Api in this project also can how can you use JWT and Api in login and registration in a MVC project

  • @darkmift
    @darkmift 4 месяца назад +1

    On 1st run you wont have a db defined so you either:
    1) manually define one and provide it in the conn string
    2) add an "initial catalog:[yourdbnametocreate]" and have Database.EnsureCreated(); in the constructor of AppDbContext and EFCore will build the DB for you.
    bear in mind you can technically comment out that line after inital run.

    • @IAmUmair
      @IAmUmair  3 месяца назад

      Thanks for the help

    • @darkmift
      @darkmift 3 месяца назад +1

      @@IAmUmair look at add-migration for proper dB init and schema modifications.

  • @RAJUDAS-lv6gc
    @RAJUDAS-lv6gc 7 месяцев назад

    hello sir, its really good video, its really helpful ..... for student

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

      Thanks and welcome

  • @elvisnguyen1478
    @elvisnguyen1478 8 месяцев назад +4

    Can u make video with authorize admin and user

    • @MarcinScholke
      @MarcinScholke 8 месяцев назад

      this is the default setting creating projevt or not?

    • @IAmUmair
      @IAmUmair  8 месяцев назад

      This is the custom settings

  • @KhubaibJavaid-y7g
    @KhubaibJavaid-y7g 8 месяцев назад +2

    It was really helpful thanks a lot

  • @dharvinar.k4750
    @dharvinar.k4750 6 месяцев назад

    Hi , thank you so much for the video.There were no errors and everything worked.Really appreciate it keep the good work up.

    • @IAmUmair
      @IAmUmair  6 месяцев назад

      Welcome, and thanks

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

    very nice explanation , little brief theory clear the concept really outsanding. Can u make this video in .net 8 blazor or how can i implement this into blazor without using controller.

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

      Thanks,
      sure, will make one in near future

  • @graigkefiloe7888
    @graigkefiloe7888 6 месяцев назад

    Thank you so much for this video and how you explain everything. Can you please do one for autherization?

    • @IAmUmair
      @IAmUmair  5 месяцев назад

      Welcome, sure coming up

  • @ahmetyasindogan7636
    @ahmetyasindogan7636 6 месяцев назад +1

    hello bro, i have a problem on the project.
    AppUser is not defined in applicationdbcontext. How can i solve this problem?

    • @IAmUmair
      @IAmUmair  6 месяцев назад

      It's because you haven't defined AppUser in DbContext.

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

    nice, ty, i tried to override basic asp.net identity, what better - full custom , or override all basic functionality?

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

      thanks,
      depends upon your requirements like what is needed - then implement that functionality

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

    At 27mins 21secs, where did all the validation jQuery and partial scripts come from? I didn't see it covered in the video up to that point. Thanks.

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

      Identity provides default validation, which you see in the video.
      There is our own validation in AppUser model in the form of data annotations [ ]
      Also, in program.cs we have modified default password validation like what we need and what to avoid

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

      @@IAmUmair I must have missed it in the video. Can you point to the time code where you added them? Like you, I started the project as an empty asp.web MVC app, and dont have those files that are shown. Thanks.

    • @IAmUmair
      @IAmUmair  6 месяцев назад

      sorry for the late reply, and AppUser mention.
      Basically we have added data annotations in LoginVM (15:10) and RegisterVM (16:45).
      We have jquery validators by default "_ValidationScriptsPartial.cshtml" and they convert our server side validation into client side validation

  • @songsvilla2669
    @songsvilla2669 8 месяцев назад +2

    Brother Can you make a video on Role management?

    • @IAmUmair
      @IAmUmair  8 месяцев назад +2

      Yes brother, working on it, will upload this soon

    • @songsvilla2669
      @songsvilla2669 8 месяцев назад

      Waiting sir @@IAmUmair

  • @gopalv5314
    @gopalv5314 8 месяцев назад

    Hi, I try to create from beginning in .net core 8. However, AppDBContext line stage itself throwing errorrs with namespaces etc. You source code has MVC name spaces included. Is it time waste going through your steps in .net core (8.0) version. I am a beginner, hence writing this comment. Don't mind. Understanding the past code, troubleshooting the errors are good practice. Milestone should also reach within the practice time given.

    • @IAmUmair
      @IAmUmair  8 месяцев назад

      Hi @gobalv5314,
      This project was created for MVC template, and will work .NET 8 also.
      If there are any issues, please refer to the source code provided in the description.
      Hope so it'll help

  • @rahulsalinskee7685
    @rahulsalinskee7685 6 месяцев назад

    Though the video is nice. It is straight forward and to the point however I did not understand - Why did you create LoginViewModel and RegisterViewModel. I mean, instead creating a ViewModel, they can be put into Model also.

    • @IAmUmair
      @IAmUmair  6 месяцев назад

      Well it depends how you do the business...
      It could have been achieved through models, but my philosophy is that models are the replicas of database tables, so adding extra properties doesn't sound good. Therefore for model binding, view models are helpful.

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

    Can you make a video to show how to create a table with a foreign key and primary key related to appuser

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

      I can, will soon make a video
      you can try adding navigation properties in models like you do in normal models, entity framework works for both scenarios in a similar way

  • @Levio1679
    @Levio1679 6 месяцев назад

    How can i unlink the Layout from Login & Register page? If i write "Layout = null;", the buttons dont work!

    • @IAmUmair
      @IAmUmair  6 месяцев назад

      If you're unlinking the layout, then buttons will not work, because scripts and styles aren't there.
      Another solution is to use styles and scripts in your view page individually, but this approach can lead to more design complications.

  • @iCodeZilla
    @iCodeZilla 9 месяцев назад

    Do you have any video related to managing roles etc?

    • @IAmUmair
      @IAmUmair  8 месяцев назад

      It's in the pipeline, and will be coming up next time

  • @saicharithvaitla880
    @saicharithvaitla880 8 месяцев назад +1

    I cannot connect to the database and creating it. Can you show it or create a video on that?

    • @soundsofnation5773
      @soundsofnation5773 8 месяцев назад +1

      @saicharithvaitla880 You have to check your connection string and credentials. After that, you have to run the command `add-migration` to create migration code. After the migration code is generated, run this command to create a database and tables in the server `update-database`

    • @IAmUmair
      @IAmUmair  8 месяцев назад

      I have videos on it, please check them out.
      Mostly the issue comes up with the connection string, also make sure SQL server is installed

  • @UmarKhan-mv6zs
    @UmarKhan-mv6zs 6 месяцев назад

    Thank you brother very helpful video 😊

    • @IAmUmair
      @IAmUmair  5 месяцев назад

      Most welcome 😊

    • @UmarKhan-mv6zs
      @UmarKhan-mv6zs 5 месяцев назад

      @@IAmUmair hi brother i followed this playlist but i need to add api to this ruclips.net/video/Xuz9N7QWd_Q/видео.html project do you know how to add api to it. Help be appriciate it brother let me know
      Thanks

  • @Technophileginfo
    @Technophileginfo 11 месяцев назад

    Please make video on three tier architecture and view data from multi models. Thank you

    • @IAmUmair
      @IAmUmair  11 месяцев назад +1

      As soon as possible

    • @Technophileginfo
      @Technophileginfo 11 месяцев назад

      @@IAmUmair Thank You and me waiting....

  • @Ivypeal34107
    @Ivypeal34107 6 месяцев назад

    thank you for your video. it really great

    • @IAmUmair
      @IAmUmair  5 месяцев назад

      You are welcome!

  • @johnleyengyo4418
    @johnleyengyo4418 6 месяцев назад

    yeah its good but the database migration is a mess it did not work it can not store the registered account in the database

  • @CartoonsAngola
    @CartoonsAngola 8 месяцев назад

    Username '' is invalid, can only contain letters or digits. I'm receiving this type of error, but I copy all cody.

    • @IAmUmair
      @IAmUmair  8 месяцев назад

      Please provide a valid email for the username, it will get solved

  • @dfsgdsgsd
    @dfsgdsgsd 5 месяцев назад

    If I have a function that is [required], will the logged in user have access to it?

    • @IAmUmair
      @IAmUmair  3 месяца назад

      Logged In users can access the resource when the Authorize attribute is defined, also you can define the if conditions for specific cases

  • @jeffsherman9638
    @jeffsherman9638 3 месяца назад

    How do you utilize this app with a API? This app connects directly to the database without going through a API?

    • @IAmUmair
      @IAmUmair  3 месяца назад

      This is a MVC application, that has UI design in it i.e Views
      We can develop API endpoints using similar controller methods.

  • @jalolxanmaxkamov4312
    @jalolxanmaxkamov4312 Месяц назад

    Thank very much Bro

  • @ashikahmedaryan1234
    @ashikahmedaryan1234 3 месяца назад

    At 30th minutes how did you remove async from loging? I'm getting error there

    • @IAmUmair
      @IAmUmair  3 месяца назад

      At the specified time, I don't think I've removed async.
      Usually we use async Task when our code has Asynchronous methods calling await keywords.

  • @RAJUDAS-lv6gc
    @RAJUDAS-lv6gc 7 месяцев назад

    brother please upload and create some video like Authorization with Authentication implement....

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

      sure brother, very soon

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

    Thank you soo much . But how can i Determine when logging in if an administrator opens a specific view and if a user opens a specific view

    • @IAmUmair
      @IAmUmair  10 месяцев назад +2

      You're welcome,
      I'll make a video on user roles next time.

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

      @@IAmUmair i hope it thank you 🌹

    • @ninho9898
      @ninho9898 9 месяцев назад

      have you already make it?@@IAmUmair

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

    Hi sir, can you make video for login user details show in the index.html

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

    Very well described👌

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

    Thank you, very helpful.

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

      You're welcome!

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

    احسنت عملا . جزاء الله خيرا

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

      جزاک اللہ

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

    Thank you for the video.

  • @najeebullah-z4w
    @najeebullah-z4w 8 месяцев назад

    very help full thanks

    • @IAmUmair
      @IAmUmair  8 месяцев назад

      Glad it helped

  • @FizzaNasir-k6h
    @FizzaNasir-k6h 11 месяцев назад +1

    Plz share its code.. its sometimes tedious to write code and needed just an overview

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

      Please check description, I've added the link to source code.

  • @Robitny
    @Robitny 8 месяцев назад

    My register.cshtml page won't load i get a 405 error but my login page works fine

    • @IAmUmair
      @IAmUmair  8 месяцев назад

      Can you plz double check the code, I've provided everything in the video and github source code

    • @Robitny
      @Robitny 8 месяцев назад

      @@IAmUmairI think it’s a version conflict I’m using .net 8.03 and the word First in the add-migration didn’t work for me . I had to use Initial instead

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

    thaank yoouu!!!

  • @iremnurmemis1622
    @iremnurmemis1622 11 месяцев назад +1

    Is the data saved in the database?

  • @RozyJaret
    @RozyJaret 8 месяцев назад

    awesome... Thanks !!

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

    awesome video, thanks!!

  • @twigmytwig9614
    @twigmytwig9614 3 месяца назад

    W Umair

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

    How can i add new columns to the table

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

      just like I added for the ApplicationUser by extending IdentityUser class

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

    Thank you sir

  • @techyguide6
    @techyguide6 9 месяцев назад

    actually why in my case user name is invlid pura apko follow kiya fir v

    • @IAmUmair
      @IAmUmair  9 месяцев назад +1

      Ye issue kb aata hai, thora flow btaa dien...
      Register k time?

    • @techyguide6
      @techyguide6 9 месяцев назад

      @@IAmUmair no no its solve

  • @tranxuanphuc6106
    @tranxuanphuc6106 8 месяцев назад

    why my PasswordSignInAsync has redline, :(((

    • @IAmUmair
      @IAmUmair  8 месяцев назад

      Check if you have used the await keyword, or if the method is async?

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

    Turn microphone volume up or speak up please - thank you

    • @IAmUmair
      @IAmUmair  9 месяцев назад

      Sure, will take care in the next videos

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

    how to add Authorization(roles)

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

      by creating roles, and assigning role to user.
      will soon upload a video related to this

  • @khalednabilaly
    @khalednabilaly Месяц назад

    Thanks

  • @aboodnasr73
    @aboodnasr73 11 месяцев назад

    Thank you

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

      You're welcome

  • @RAJUDAS-lv6gc
    @RAJUDAS-lv6gc 7 месяцев назад

    and create video with admin lte theme impliment......

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

      Ok coming soon

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

    18:55

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

    Mvc with ViewModels ?

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

      Yes, video include ViewModels

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

    Works! Great!

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

      nice to hear, pleasure