Thanks! I had to watch authentication video from updated playlist to completely understand first and second videos from this playlist. Authentication is extremely complex topic
Great tutorial. Really strips down all of the extra stuff that you really don't need in order to understand just what is necessary for authentication. So many other tutorials will also include these huge websites and a bunch of other services/app configurations that are confusing to know which ones you need specifically for user authentication/identity - yours is like the most basic version to make it clear as to what you need exactly to get up and running. Thank you!
Anton, you have done a great job with explanations and WHY things are done this way. I'm in the second video and I'm very impressed. You should turn these videos into a complete Udemy course. I'll be watching some of your other courses like the Vue series, as I'll be building a Vue client and I'll be creating an IdentityServer4 for Vue client and Web Api.
Once again you are awarded for best explanation and coding materials. One request to you can you make two piece video from big video for the above subject so that I can become mastering..
I like how you include portions of the video where you search for documentation. Many video just go through thing like magic. I always question how they know what classes to use and what to include.
Thanks for the video. The entire video is beginner-friendly enough, but what's a bit disappointing is that it seems using the identity framework does require some extent of familiarity with the library which means instinct usually doesn't work.
Cheers, this video was meant to be an introduction to the Identity library as what I showed in the 1st episode, Microsoft have built the infrastructure around that for user management.
You are my hero. I've tried so many different tutorials for this (including the one on Microsoft's docs), and they all failed. But your tutorial, sir, result.Succeeded
@@RawCoding Just realized one small issue. It looks like after one day's time, the user I created yesterday is not recognized anymore. Is this a simple configuration issue?
Awesome tutorial! MS should hire you to do their videos! Respect for updating the namespace after moving, a lot of people forget to do that. How did you learn all this ? Just by reading the docs and trial and error?
@@RawCoding Im implementing this using dapper and repository pattern. Do you think I can get away with just .AddIndentity().AddUserStore() or I need UserManager as well ?
I have been watching this course and I really liked how things are explained, I see he is storing new users in memory, wondering how it would be if you needed to store in a Sql Server DB
@@RawCoding Thank you for answering my question, also, do you have any course recommendations for beginners? I'm trying to create a project with login validation at the moment. Thanks
This is a good video explanation about authentication and authorization without sacaffold . I have a question. Where do you get the documentation about httpContext, claim and others? I was searching in doc.microsoft because is the original documentation but i dont get it at all.
I did that with VS 2022 Preview. There is no output for Web Server I could find. Looks very handy especially when you don't do post backs that display validation errors. Instead there is actually a dedicated window that pops with the application you run and the messages are there. Very good explanations.
Hi Anton, wonderful teach. I was practising this code but at 31:34, I am not getting a cookie created upon registration. It seems to only get added after logging in.
Thanks a lot for this amazing video !! I'm a beginner programmer, & I have task to move an old system to dotnet core 3.1 so i had to use ADO to keep all DB tables as is ... this system has it's own user table, so my question is: how to implement those steps instead of predefined class of "User" that created by Identity , and using the old users existing DB tables?
Great video. If the information will be shared between intranet (windows identity, AD groups) and internet web app (registered identity). Do I need build 2 websites? or there is a better structure to combine these 2 together? Thank you!
not sure what 2 websites you are talking about, but with AD you should already have your SSO solution for intranet and I don't think you need an identity server
Great video! Do you know what hashing algorithm does Identity use? I'm storing users in my database and want to see if I can decrypt short passwords I entered.
it uses the data protection api available within dotnet core. docs.microsoft.com/en-us/aspnet/core/security/data-protection/introduction?view=aspnetcore-6.0
@@RawCoding sorry what I meant is sometimes you deep dive into the Interfaces but if you could take a step back and explain how you found out which classes to use.
@21:37 you only used "username" to validate the authenticating user but there is no validation made if given "password" is validated too?? Why do not validate password?? I am new to this, and would appreciate if you can refer some more on this. thanks
The example here is not a proper way to validate input, it’s a way to sign in and you don’t really need to get the user ether. It’s possible to use the sign in manager to sign in with username and password
Mhmm typing fast and keybinds are just for show. Most of the time you spend thinking so best upgrade the brain :D Saying that I might make a video on how I type.
I am getting the below exception on going to the login page: AmbiguousMatchException: The request matched multiple endpoints. I tried to review my code but could not resolve this
7:35 I have a question. I looked around for the repository pattern, and from what I understood, it's to ensure testability and separation of concerns. But I also read that EF implements Repository pattern and Unit Of Work pattern. So my plan then was to, depending on if I'm testing or running in production, inject a fake/real db context through the dependency injection (through ENV variables). Is that okay? Is my understanding correct? What do you suggest I do? Any recent references where I can read up on this would be great too, all resources I found are somewhat old, and they seem to still debate the point of IDbContext and/or IAppDbContext. Thanks you!
EntityFramework is the ultimate database abstraction “ultimate repository” so you don’t need to hide it behind a repository unless you are planning on replacing it some day
Thank you for that info! I'm guessing you also mean that the ENV thingy fake/real DB is okay. Replace you mean replace EF with things such as NHibernate/Dapper, right? Hmmm Doesn't seem like that's on the horizon anytime soon. In case I'm asked to do that, for the abstraction, I'd just have a bunch of classes to CRUD on my tables, and use them when I want to CRUD data from the 'business logic', correct?
Thank you for your wonderful contribution. I have one question - 1. Before using ÜseAuthentication() method, when browse to /home/secret then it tries to authorize the user so there it execute the code written in Authenticate method but redirect to index because last line say - return RedirectToAction("Index"). And this makes sense. 2. And after putting ÜseAuthentication() method, when browse to /home/secret then it tries to authorize and navigate the user to /home/secret. But when try to debug the code, no debugger come in Authenticate method and it neither navigate to index page, it should bcoz last line ofAuthenticate method say reditect to index page.
I got this error in Startup.cs: at the app.useAuthorization() - Message=Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddAuthorization' inside the call to 'ConfigureServices(...)' in the application startup code.
@@RawCoding When using ASP.NET Core Identity (Role, RoleClaim, User, UserClaim, UserLogin, UserToken and UserRole) table gets created by default. I am curious about this RoleClaim table. Please make a video on the subject.
Can't belive that you answer that too much comment :D You don't use a gpt-3 bot right? it would be fun . My problem is even it creates cookies , I can't access secret action, it's still keep redirecting me to login. user creation and sign in works perfect so I don't know what to do right now ...
InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' while attempting to activate 'IdentityExample.HomeController'. I am getting this error kindly help me to figure it out.
I just want to hear compared to before that I kind of throw myself further over your eg as you have made and are doing. So will I just do it with mongodb? And make use of it the same way? Here I mean if it is possible to just do the same? Nice video! :)
@@RawCoding What I'm trying to explain. it is that I want to do something for my side of the same but it must be built in mongodb in relation to the database. Is it something that is possible?
ExtendedSocketException: No connection could be made because the target machine actively refused it. 127.0.0.1:25. I am getting this error when I run Identityexample can you help me with this?
I see you already answered a question whether this would work with a WebApi or not. But my question is - would you consider a tutorial for a web mvc app that connects to an authorized web api? I want to use these principals on an API that can deliver data to an mvc app
Very good courses you gave us thank you buddy, i have one question ; what happens to that in memory database , is it persisted if the server restarts ? if no then how to persist those tables ? many thanks