Hey guys.
So welcome to this new video.
Exciting times ahead we're going to be looking at authentication and user authentication in our school
management system.
Now up to this point we've been looking at how we'd go about creating content putting our database how
creating courses students what we haven't really looked at controlling who can do what.
And that's why user authentication is really all about putting in that one need to register and to log
in mechanism and restricting access based on if you're registered versus if you're not registered what
can you access if you are registered those kind of things.
And that is where we want to start off to date from the very beginning of this tutorial you would have
noticed in the top right hand corner of our enough bar that we had a register button and we had a log
in button.
Those have been there the entire time I haven't clicked on them open to this very video and we will
actually see what happens.
Now it's noteworthy that this would have been generated for you from the get go.
And when I say the get go I mean when you are creating the projects.
There was an option there that asked you what kind of authentication you want.
And it had something for individual accounts and such and so forth.
We'll get into that bring you back through those steps so you can reacquaint yourself with those options.
How do you select a no authentication then no work would have been done before hand.
Have you selected individual icons at the very least which is what I did you would would have gotten
these buttons as well as some auto generated code that would have been in the whole project template
as you would have seen it from the start.
So to begin we're going to walk through visual studio just create a mock project and you will get to
see the exact options that I was referring to.
So here we have visual studio once again.
And this should be an all too familiar page once you open a Visual Studio you are rooted to this start
page where they want to know do you want a project et cetera et cetera.
We can just go to a new project create new project select web application I'm not going to give it a
specific name because I'm not really going to create one I just want to show you what I was talking
about when you select MVC and then to the right you see that you can change authentication so authentication
right knows no to no authentication meaning because the last project I did I created it without authentication.
There are ways to get authentication in you'd have to get some identity libraries and do some manual
work yourself but then you can always change authentication from the creation point and then click individual
user accounts.
So you do have work or school accounts which would link it to look at any of Windows authentication
which would probably use like ended up for a more intricate internal kind of setting.
Well then we would want to use individual user accounts because we we're not necessarily sure who will
be accessing.
So I guess based on the nature of your project you can use individual or you can use ended up but for
this purpose on when to use the individual user accounts and if you read the description they say for
applications that stories or profiles in a sequel database and it also allows users to register using
existing icons for social media platforms.
All right so it actually generates all of that code and those interfaces and you just go in and plug
in whatever is required of you accordingly so you can just select individual user accounts.
Okay.
And then when you click okay the project would then be prepared as we know.
So back to our projects where from the get go we actually selected individual user accounts.
We would be able to run our register and run a log in.
So I'm just going to walk quickly through the register and show you how the code works.
This is strictly out of the box I have not made any modifications and we can put in an e-mail address
I can see and I see I already have one here and I can use a password.
Google is suggesting a very complicated one to me I just use that and then I click register
and there we go where relative to the home page where we know see clearly displayed a hello.
That email that I just entered and it's giving me the ability to log off so I can click log off and
then I'm went to try and log in with those exact credentials and ask Google to see if those credentials
because you know the the password was a bit complicated to remember.
So I ask Google to save it.
And you see all of these screens are register screen.
This log in screen all of those came out of the box with the individual user accounts.
User identity registration engine.
So I can just click log in right here and you'll see that I know a row to the right back to that home
page where I am no logged in.
All right.
So in this tutorial we're going to take a tour of this whole engine.
All of the code that would have been generated if you want to add more fields.
What do we need to modify.
And we will get into how we can go about customizing this to our own needs.