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. :)
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.
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) : (
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.
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.
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
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?
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
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?
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?
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.
Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' while attempting to activate
I got error InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.SignInManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' . What i do wrong?
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.
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?
@@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?
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?
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
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();
This guy is world class; the absolute best instructor on the planet in my opinion. AND, this is free! Wow!
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.
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. :)
Please add tutorial for asp.net core mvc Login with authentication and authorization without Entity framework, because many of us wants to use dapper.
Even 2 years later, this video helped me a lot!
No doubt you are an amazing teacher !
You are amazing, thank you.. keep it, i do not have word to thank you
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.
me too, how to fix it? can u resolve it? sir
It does not affect. It still login no matter remember me is checked or unchecked
For me it doesn't work in Chrome but it works in Edge. Weird.
@@argeltal9090 goto chrome://settings and scroll at the bottom of the page, you'll see a startup section, enable first option that's it.
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) : (
you were able to solve that problem
great one !!!
Perfectly done with all the cases.
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.
Thank you Venkat. Really great videos as usual.
Excellent sir. Much appreciated
You are amazing, thank you.. keep it
Thank you ! with your help i am preparing my project
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.
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
Thanks for your video
Great
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?
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?
Thank you sir...
Hello, I have a question, when you logged in, how can i get data from the account I have just used to logged in?
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
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?
Did you found a solution ? I have the same problem
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?
Perfect!
Thank you Venkat.
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.
How does ASP.NET core handle local storage and session storage?
I am not able to get the Logout after Logging In. What should be my mistake
just scalfold the logout using the identity into your Areas/Identity folders
Hello, where does this actually save the user login/password, is it in a database or a file of some sort? Thanks
I am wondering why are you logging user without checking his credential in Database? Are you ?
Hi
Please make tutorial using Code first approach.
Does it not create a session if you don't select "Remember me" ?
It would be better if you had made signup and login without identity.
Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' while attempting to activate
Configure the service in Startup.cs
How do i get the plain text of a forgotten password?
Hi, can you put in github the entire code of the series?
can anyone please explain
@Html.DisplayNameFor(m => m.RememberMe)
Thanks
After successful registration i cannot login.
Y i am getting invalid login attempt when the new user is created and os present in database.
in your startup class, configureServices remove "options => options.SignIn.RequireConfirmedAccount = true"
@@Firegorillaz Thanks man, It's really helpful.
@@dhruvalgandhi my pleasure buddy
given an error No overload for method 'PasswordSignInAsync' takes 3 arguments LoginandRegistrationinmvccore
After IsPersistent argument a fourth argument IsLockedOut is required. Set it to False.
I got error InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.SignInManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' . What i do wrong?
I got that error too. See the part 65 and check your startup class.
@@PANDA-uu3tv this is the part you have to see, it´s all explained:
ruclips.net/video/egITMrwMOPU/видео.html
For some reason, everything works perfectly. but suddenly signinmanager.issignedin(user) returns false.
I'm also having the same error sir..can you find the solution.please help me sir😔
Do you have the source code for this [project
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.
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?
were you able to solve that problem?
@@emmanuelguardado9015 yes. All is ok.
@@amelPC Could you help me? how did you solve the problem?
@@emmanuelguardado9015 ok, what is your problem?
@@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?
Can anuone tell which controller is used??
AccountController
Imagine making a tutorial that uses Razor pages in 2019
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?
please replace jquery with vue js
Liquid Gold
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
They male use of SSO. Look for IdentityServer4
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();
Thanks a lot sir .you really helped me
@@nivetha6050 You're Welcome, we are all here to helpeach other.
Thank you sir...