Hey, did everyone they.
Sure.
And in this video, we're going to just create a basic project, initialize it with, install some of
the libraries, some of the one which we are familiar with that quite a lot.
Some is going to be new, obviously, and after that we are going to just create some models and everything.
So what is the whole idea?
The goal is we want to have a button which say simply Google login.
As soon as somebody clicks on it, we'll show the consent screen as soon as it gives us the permission
that I want to log in with this Google account, then we're going to come back.
We'll extract the email of the username, we'll store in the database, and there comes the problem.
We want to actually code the flow in such a way that if the user already exists in our database, then
we want to just go ahead and say, Hey, you log in.
If he doesn't exist, we create a new entry in the database and we allow him to just log in.
And there comes the issue that when can we actually assign some of the tokens or we can go with the
password way, a whole lot of things.
So I hope I have given you the brief enough overview of how the application is going to work on.
Let's go ahead and move on.
So I'll go into our AE back end.
There we are creating all of our application and stuff, so let's go ahead and create a new directory
and we are going to call this one as simply AE Passport Google.
So a kind of a weird name, but this is what we are going to go with that.
So let's go ahead and move into this one.
So this one is AE Passport Google.
Now, once I'm inside this one, I'm going to go ahead and create NPM in it and we are going to use
a dash Y option to just have the all the files being created for this one.
If I go quick Ellis package, the JSON is available for me now.
Let's go ahead and install a few packages.
So we're going to go ahead and say, hey, I want to install Express.
We are quite familiar with the Express.
We have done extensively with that.
We have also touched a little bit of edges.
We are going to use that.
No, this is not a dedicated tutorial on just building the entire application with Node.
This is moreover a just backend.
So we'll be just taking a bare minimum of edges, not conditional rendering and everything.
So we are going to just go stay there.
Now we're going to be touching the database.
So we already know that Mongoose is the guy who is going to do the job.
Now, another library that we are going to use is passport.
And since we are actually working on the strategy of the Google itself, so if I click on The View all
strategies and I type in for Google or to it requires me another of the package which says a passport
dash.
In fact, I can copy this passport dash, Google dash.
Or what?
Two zero.
So that is the one that we are going to need.
So password is the code package.
You are going to 100% need that with whatever the strategy you are implementing.
And after that you can say that what kind of strategy are bringing in?
If you are bringing in Facebook and everything, then after password go ahead and install all those
one.
Now there is one more new one here which is going to be simply cookie and this is all one word.
See is hiding there.
If I can just extend this, will it make sense?
Yeah.
So this one is cookie dash session.
Now why we are having this cookie session.
We haven't worked.
Hey, come on, cookie does session.
So why we are using cookie session?
In the previous of the application, we never installed any kind of these things.
We actually work directly with the Express.
Yes, I'm aware of that.
But notice here we are not having the JSON web token.
So JWT are not coming in yet.
We will have the JWT, right, thanks to the password itself.
So let me first go ahead and install all of these ones.
Okay.
So that was really quick.
All of them got installed, but now I have got one more to install, so I'm going to go ahead and remove
all of this.
In fact, I'm going to say Dash DX and again, our favorite trusty node man.
So these are the all ones that we got as the basic ones, hopefully.
And let's go ahead and fire up the code later.
So we're going to say code and dot and hopefully they should fire up my VSE code.
Yes, of course I do trust it.
Okay.
So this is the basic let me let me expand this all the way up here.
There we go.
Nice and easy.
This can go a little bit extended.
There we go.
Okay, so first thing, let's check out the package that Jason.
Everything is installed is looking fine and we are having indexed.
So let's go ahead and say this is going to be a start and this one is going to simply say node indexed
or JS and let's copy this and have the dev also.
So we're going to go ahead and save.
Node, Mom.
And there we go.
Now all we need is a new file which is going to be indexed or JS.
There we go.
So the basics of all the application is all done.
Now, the very first thing that we are going to do is create the model that is going to be like a really
super small video.
So let's go ahead and catch up in the next video and create a model for the user.