Welcome to the final video of the project.
They'll be discussing the final step of security and authentication of our secret speech.
That is, as you can see here, sign up with Google and sign up with Facebook.
So how to do that?
So white.
What what do you mean by what?
Firstly, what do you mean by what?
Or means open authorization.
Open often, I.
Session.
Kindness, yeah, open up tradition.
So it's an open standard for token based authorization.
Why do we need a what?
So basically, we need a lot more granular access levels read, write or read or read plus write access
and revoke access to have doubt for this meaning you can stick them in the Google.
What do you mean by granular access levels?
What do you mean by revoke access and everything?
So first thing we to be doing is we'll set up our app.
That means we have the Secrets app, the social app, right, that will set the social app in their
developer console.
For example, if you're using Google or what Google open authorization, we'll set up our app in their
Google Developer console that using Facebook will be setting up our app and said that Facebook developer
console, if we are doing it up, then we'll be setting it up inside their GitHub console.
So in Britain, we will get App Idea Client daily and we our website is the client which will make their
request to Facebook to authenticate our use it.
So once users sign in with Google or Facebook in Britain, we get the authentication code from Google
or Facebook.
We can exchange our code with access.
Token for access token is basically valid for a lot longer than the authentication code.
OK.
So we'll be implementing logging with Google, using a passport and Google log, so that if you see
a passport, the phone.
Can search for strategies here, you can find Google or tried Google.
Basically one or two points.
So yeah, so how to do this first thing, you have to install this npm package.
And the second thing they have to create an application for, they have given a link for Google Developer
console can go to that console and then create an application.
So this is a process for creating this application.
First thing.
You have to click on Create.
You can click on Create New Project once you click on New Project, you'll get the project name and
everything, you can give your project some name.
And then you have to go to the credentials section.
Just follow me, you know, follow my words and then you can.
You can do what you don't want to do.
Go to credentials section and then go to what contents clean.
So we are going to configure the screen that the user sees in the log in through Google and that when
they log in through Google to add name, logo and scope for Google apps, save and create the API credentials,
select what claim daily and then they're going to be authorized.
JavaScript logins that you have to go localhost three thousand and then authorized to do that if you
are and you can localhost 3000 or slash Google's hash secrets and now save the client Debian client
secret in their environment variable and then required the strategy.
So these comments might be confusing, but in the resources, the resources that are that you are provided
with, I'll be sharing a PDF.
So this PDF will be having the complete roadmap.
How to do this Google Developer Consulting.
So from starting scratch to completing getting the claim daily on the app, it would have clear detailed
explanation of the road map.
You can follow that.
So once you follow, you would be getting the list three record total intervals you can see here.
I'm having the plane tied to this plane that they will be using to make the strategy, so to get this
plane area will be sharing the road map as a PDF, you can check that.
So once we get the Client ID.
Next thing is Google strategy.
So he had a passport that used Fiat using the Google strategy.
If you want to implement from Facebook, we can use the Facebook strategy.
So this is a challenge for you.
How to do.
I'll be only sharing the road map of the Google strategy, how to get this client ready.
But the Facebook, you can refer to the online sources and check the documentation is very simple.
It is almost similar to everything, but only thing is the Ulit app ID.
And instead of trying to restrict what that symbol, the names are different.
That's it.
And then then point the call back.
You are a little bit different.
This will be the call back to you on it.
And then here this is the project name that I'm using.
OK.
So once we do this, everything and then.
If you see here.
So I'll show you one thing.
So here.
This user, a final create is a npm package.
OK.
It's not a Mongo, not a MongoDB method, but it's going to be items and user is the collection of that
Mongo DB that we are creating.
But this find that it is not among those deep MongoDB MongoDB method.
It is npm package.
So we have to separately consolidate npm install and then find or create and then we can import it here,
find, not create.
Using that one was find out that we have to install this package.
There's going to be a mungo's find or cleared and then required.
So once we do that, we can use the Facebook or Google strategy, when the strategy is completed, then
we can basically get the code from the passport documentation of the whole court after you can go to
the documentation audio.
OK.
Way it is.
So what should be in the get method, what should be in the get method of art, we will not call back
and go to the documentation.
Now finally, I have to change the surrealism de serialize uses to work from the start strategy instead
of working only for the local strategies.
OK, so as you can see here here, this serialised here, I'm giving you said and done and adultery.
So this will work for all the packages, not only the local masks, but all the Google strategies and
all the other strategies.
So once this is done, then we can basically, right, you know, and get it on this cold like I brought
get kidnapped daughter post and everything from the documentation.
Yeah.
So with this, we have completed that authentication part.
So the main thing is you have to understand what we are doing and how it is done.
The court, but basically all look programmers or developers who are there and you know, who are there
in the industry.
Basically, just use the Google StackOverflow to get this code.
None of them remembers the code.
It's only the concept of how what we are doing and how we are doing.
That is what we have to focus on and the core thing you can use the documentation is to refer.
OK, it's simple as that.
So there are comments given to this, what it is doing and everything.
You can take this all code, it will be provided to you.
So there's a challenge for you.
Have to implement the log in with Facebook.
OK.
Now finally, once we do this, we can run our thing and check an example I'm using.
Sign up at Google.
And then using this, my account.
So once they use this so we can go to the Descartes database, just refresh it.
And if you check in Britain, they're giving the database a Google lady.
So whenever next I click on log log in, then they will compare that Google idea with this Google Light
in the database.
OK.
In the schema.
And then they will allow me log in and log.
So as of now.
I'll be deleting this.
So this is how the Google authentication is done.
So basically, we have seen a social networking website with the highly secure and authenticated environment
where we saw many different types of things like many levels of being like, first thing, we have just
saw storing the username and password in the database and then encrypting the database and then using
the environment variables and then only hashing and then solving and mashing, posting, only hashing,
using modify solving.
Imagine using.
And then we saw what is cookies, what of systems, how to use them with passbook, what is serialized
and what is serialized.
And then finally, Google authentication, Google Developer console.
So all these things will destroy the roadmap of Google or what?
You will be getting it in a PDF or image file the resources that you are provided with.
We have sort orders get ignored.
Will do so.
Do Is Scalia completely highly secure social networking app they can post your really can post your
posts, photos and everything at fixed.
Here we are only posting some pics, but you can modify it to post any major Saoradh can.
You can see the documentation for the Google.
So with this, we complete this project of social networking website.
I hope you have understood all the concepts and enjoyed the videos in this through this project.
Thank you.