Implementing login functionality in asp net core

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

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

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

    This guy is world class; the absolute best instructor on the planet in my opinion. AND, this is free! Wow!

  • @TalhaKhan-gu3vk
    @TalhaKhan-gu3vk Год назад

    Sir I admire you and respect you from the core of my heart. I only had few great teachers in my life and I can proudly say you're one of them.

  • @ShakirAlimit
    @ShakirAlimit 3 года назад +1

    Waoooo!!!! till now I was using sessions and cookies to manage login and remember me but thanks to Identity Framework and kudvenkat sir which was time-consuming. Now I can save my time. :)

  • @jayceeddeyro1406
    @jayceeddeyro1406 5 лет назад +14

    Please add tutorial for asp.net core mvc Login with authentication and authorization without Entity framework, because many of us wants to use dapper.

  • @stratisdermanoutsos9113
    @stratisdermanoutsos9113 3 года назад +1

    Even 2 years later, this video helped me a lot!

  • @yasirhabibkhugiani
    @yasirhabibkhugiani 3 года назад +1

    No doubt you are an amazing teacher !

  • @LucasLima-il4ky
    @LucasLima-il4ky 4 года назад +1

    You are amazing, thank you.. keep it, i do not have word to thank you

  • @vkman34
    @vkman34 3 года назад +3

    Re Session Cookies. In Firefox and Chrome you can tick a setting to start the browser with the previous session. If you do this, then when you close the browser window, the session cookie is not deleted. It stays in place when you re-open the browser.

  • @SilverMan93
    @SilverMan93 5 лет назад +9

    It does not affect. It still login no matter remember me is checked or unchecked

    • @argeltal9090
      @argeltal9090 4 года назад

      For me it doesn't work in Chrome but it works in Edge. Weird.

    • @_samirdahal
      @_samirdahal 4 года назад

      @@argeltal9090 goto chrome://settings and scroll at the bottom of the page, you'll see a startup section, enable first option that's it.

  • @mrtreendy2683
    @mrtreendy2683 4 года назад +3

    This line returns success, however, user isn't logged in when checking "signInManager.IsSignedIn(User)"
    var result = await signInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, false);
    I looked at the browser dev tools, and it does create the ".AspNetCore.Identity.Application" session (I am having the same issue with the register tutorial too) : (

  • @mihailomarcetic2516
    @mihailomarcetic2516 3 года назад

    great one !!!

  • @naodagere8210
    @naodagere8210 4 года назад

    Perfectly done with all the cases.

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

    Very helpful Video, Thanks Venkat !!
    tried the solution.It seems we are displaying "display name" for remember me twice. In ViewModel by setting "display "prop..and then in our view Login.cshtml we are using label(for display) and also HTMLtag helper, they both basically do the same thing i.e. showing the display name of prop.

  • @abdouldia1605
    @abdouldia1605 5 лет назад +1

    Thank you Venkat. Really great videos as usual.

  • @akhilvishnuts7835
    @akhilvishnuts7835 4 года назад

    Excellent sir. Much appreciated

  • @marconagel3018
    @marconagel3018 4 года назад +1

    You are amazing, thank you.. keep it

  • @faridmammadov4277
    @faridmammadov4277 5 лет назад

    Thank you ! with your help i am preparing my project

  • @AlishSafarli
    @AlishSafarli 4 года назад +1

    Anyone has an issue with cookie? I mean even I do not check the remember me, and sign in then close the window, reopen it the cookie still exists there. How can I solve this? I debug it, the viewModel gets false in rememberMe property and is sent to the controller like "false". But still cookie stays.

  • @_samirdahal
    @_samirdahal 4 года назад +1

    For those who are wondering why Ispersistent: true or false is not working.
    Make sure you have open new page option enabled in google chrome settings.
    To enable that follow these steps:
    goto: chrome://settings
    scroll at the bottom, you'll see startup section. Select the first option.(Open New Page)
    Previously I had enabled continue where left off option so that might be the reason it preserved the session based cookie

  • @salmanchowdarym1110
    @salmanchowdarym1110 5 лет назад

    Thanks for your video

  • @AshutoshKumar-kt1dd
    @AshutoshKumar-kt1dd 4 года назад

    Great

  • @madmaxwhatever
    @madmaxwhatever 4 года назад

    How do I make the login boxes show directly on the index page? So the site opens directly with the login fields without having to click login?

  • @AkshayKumar-dz5ts
    @AkshayKumar-dz5ts 4 года назад

    For some reason, everything works perfectly but the cookie isn't being sent to postman or my browser. I implemented this whole project as a web api btw. Any fixes or tips to get the desired behavior?

  • @sakthivel-lc9ni
    @sakthivel-lc9ni 5 лет назад +2

    Thank you sir...

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

    Hello, I have a question, when you logged in, how can i get data from the account I have just used to logged in?

  • @riteemaharjan4351
    @riteemaharjan4351 3 года назад

    hello i got problem while logging in..though i try to login with correct username and password it shows invalid login attempt..i used breakpoint at the post login action at if(result.succeded) it has false value though i had input the valid username and password that exist at database...i am so upset..please help

  • @maiabdulaziz2833
    @maiabdulaziz2833 4 года назад +1

    When I set isPersistent to false, and close my browser window and then run the application again, the session cookie is still available and user name is still displayed! why?

    • @argeltal9090
      @argeltal9090 4 года назад

      Did you found a solution ? I have the same problem

  • @valentinmorales2633
    @valentinmorales2633 3 года назад

    Does someone know if the Login functionality (Login Actions) can be moved from the AccountController, to a separate service? For example to a web API, and then just call this API from our MVC application?

  • @jpcapucho302
    @jpcapucho302 5 лет назад +1

    Perfect!

  • @hirankailas
    @hirankailas 5 лет назад

    Thank you Venkat.

  • @nikhilbarapatre2750
    @nikhilbarapatre2750 3 года назад

    How does the cookie get created ? You have not written any code which is creating the cookie ? After logging in, you are just redirecting to the home page.

  • @henghengheng9416
    @henghengheng9416 4 года назад

    How does ASP.NET core handle local storage and session storage?

  • @bhanumathi2841
    @bhanumathi2841 5 лет назад +1

    I am not able to get the Logout after Logging In. What should be my mistake

    • @kyy6150
      @kyy6150 5 лет назад

      just scalfold the logout using the identity into your Areas/Identity folders

  • @Vint33k
    @Vint33k 4 года назад

    Hello, where does this actually save the user login/password, is it in a database or a file of some sort? Thanks

  • @aminehamdi9743
    @aminehamdi9743 3 года назад

    I am wondering why are you logging user without checking his credential in Database? Are you ?

  • @priyaarun3805
    @priyaarun3805 4 года назад

    Hi
    Please make tutorial using Code first approach.

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

    Does it not create a session if you don't select "Remember me" ?

  • @bablykiran9577
    @bablykiran9577 3 года назад

    It would be better if you had made signup and login without identity.

  • @autohorror
    @autohorror 4 года назад

    Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' while attempting to activate

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

      Configure the service in Startup.cs

  • @cris8815
    @cris8815 4 года назад

    How do i get the plain text of a forgotten password?

  • @jhonhernandez9210
    @jhonhernandez9210 4 года назад

    Hi, can you put in github the entire code of the series?

  • @lifetraveler8008
    @lifetraveler8008 4 года назад +1

    can anyone please explain
    @Html.DisplayNameFor(m => m.RememberMe)
    Thanks

  • @sarahjaved7185
    @sarahjaved7185 4 года назад

    After successful registration i cannot login.
    Y i am getting invalid login attempt when the new user is created and os present in database.

    • @Firegorillaz
      @Firegorillaz 4 года назад +1

      in your startup class, configureServices remove "options => options.SignIn.RequireConfirmedAccount = true"

    • @dhruvalgandhi
      @dhruvalgandhi 4 года назад

      @@Firegorillaz Thanks man, It's really helpful.

    • @Firegorillaz
      @Firegorillaz 4 года назад +1

      @@dhruvalgandhi my pleasure buddy

  • @jishansiddique6046
    @jishansiddique6046 5 лет назад

    given an error No overload for method 'PasswordSignInAsync' takes 3 arguments LoginandRegistrationinmvccore

    • @waqasriaz30
      @waqasriaz30 4 года назад

      After IsPersistent argument a fourth argument IsLockedOut is required. Set it to False.

  • @PawelHoraczy
    @PawelHoraczy 5 лет назад

    I got error InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.SignInManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' . What i do wrong?

    • @victoralarcon3163
      @victoralarcon3163 5 лет назад

      I got that error too. See the part 65 and check your startup class.

    • @victoralarcon3163
      @victoralarcon3163 4 года назад

      ​@@PANDA-uu3tv this is the part you have to see, it´s all explained:
      ruclips.net/video/egITMrwMOPU/видео.html

  • @milindnikam5875
    @milindnikam5875 4 года назад

    For some reason, everything works perfectly. but suddenly signinmanager.issignedin(user) returns false.

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

      I'm also having the same error sir..can you find the solution.please help me sir😔

  • @szafar5797
    @szafar5797 4 года назад +1

    Do you have the source code for this [project

    • @akashmacha1999
      @akashmacha1999 3 года назад

      He added the drive link of the source code in the last video of the series. Here it is: drive.google.com/drive/folders/1z49q-8xkKu8N8VjdemYKTs_4IbzBeLWM
      Hope it helps.

  • @amelPC
    @amelPC 4 года назад

    Hi.
    I have litle problem.
    On Log in: var sign = await _signInManager.PasswordSignInAsync(signinVM.Username, signinVM.Password, signinVM.RememberMe, false);
    sign is sign.Succeeded = true. After that on Home page user is not sig in (signInManager.IsSignedIn(User)) . Can we help me?

    • @emmanuelguardado9015
      @emmanuelguardado9015 4 года назад

      were you able to solve that problem?

    • @amelPC
      @amelPC 4 года назад +1

      @@emmanuelguardado9015 yes. All is ok.

    • @emmanuelguardado9015
      @emmanuelguardado9015 4 года назад

      @@amelPC Could you help me? how did you solve the problem?

    • @amelPC
      @amelPC 4 года назад

      @@emmanuelguardado9015 ok, what is your problem?

    • @emmanuelguardado9015
      @emmanuelguardado9015 4 года назад

      @@amelPC I have followed every step of the tutorial, but the passwordSingInAsync method returns null in the result variable. For that reason I can't log in!
      could you help with that, how did you solve it?

  • @surajbasera6511
    @surajbasera6511 4 года назад

    Can anuone tell which controller is used??

  • @yusomadbro01
    @yusomadbro01 4 года назад

    Imagine making a tutorial that uses Razor pages in 2019

    • @theDonaldducktv
      @theDonaldducktv 4 года назад

      I'm new to learning .net and have just been watching things you can do with the framework, what's wrong with using Razor scripts? and what would be your way of inserting data into pages?

  • @aimanalnami7655
    @aimanalnami7655 4 года назад

    please replace jquery with vue js

  • @his-worddevotionals540
    @his-worddevotionals540 2 года назад

    Liquid Gold

  • @georgekopadze791
    @georgekopadze791 5 лет назад

    Can anyone suggest how can I track all login sessions. Like facebook and gmail has, it displays all of your sessions and you can signout all devices remotely. Thank you

    • @igbekelechi258
      @igbekelechi258 4 года назад

      They male use of SSO. Look for IdentityServer4

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

    For Those Who May face Problem with the Dynamic Display of Regisert/Login and Logout Links in the Configure Method of the StartUp.cs Just Add
    app.UseAuthentication(); Just before app.UseStaticFiles();
    so It looks like this:
    app.UseAuthentication();
    app.UseStaticFiles();

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

      Thanks a lot sir .you really helped me

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

      @@nivetha6050 You're Welcome, we are all here to helpeach other.

  • @aimanalnami7655
    @aimanalnami7655 4 года назад

    Thank you sir...