For everyone.
We already completed the authentication of the world chart and this video will be for the authorization.
Okay.
Firstly is the user schema.
We need to provide one more prop we based.
The rules will be screen.
Okay I only do one row but users okay.
For the one authorization I already have a course about us okay.
This project only focus on the real time stuff.
Just hand off of the social media.
I will not leave that into the authorization in this project.
Okay, I already have an advanced course for authentication and authorization.
You can check about us and integrate into this project.
It is very good exercise for you.
Okay.
Right now let's keep it simple.
We have a problem with row restrict only last.
And I think we can boost for simple user and Ahmed in here.
Let's drop everything from the database right now.
It's right here, actually.
Right here.
We can put the file will be user.
Okay.
The default row will be user.
Now let me.
Create again.
But you can say right now we already add one more property.
For that reason we need to customize the JSON web token a little bit.
Because in this inside the JSON web token, we need to add a little bit of information about the authentication
and authorization.
Also right inside authentication service over here, the registration web account we will put a role
Okay.
And right here is that side also.
Okay.
And inside the global I use by lot we need to put a row also.
And inside the.
Glass right here.
When we decoded user we will have a row.
Okay.
Let us use customize and let me sign up again.
With this email.
And let's say oh, sorry, I forgot.
Remove the collections.
I will drop this collection and I will say it again.
Now right here.
We already got the data we need to customize a little.
Also.
I use both the row.
We will see what it will return the row.
But right now if you check.
These are the user.
You will say we already got the row will be user by default right?
Let me say one more time.
Mokhtar.
Okay, we got the role, so.
Let me get a profile.
We will.
Got the ID name and email we need to customize.
Let me say add a name and email.
Mm.
We don't have the row over here.
Let me try to rework the JSON web token over here.
Shall I go?
And most likely.
You will say we have.
This guy.
Okay.
Let me draw.
It.
Insert.
Go right here.
And we asked this guy.
Let me try to console.log.
What is the user?
We have a row, right?
We have a row.
Between in here we also got a row.
Let me console.log current.
Ah, I know the reason.
The reason because there is one user right here.
I completely forgot.
So always there is more query row over here.
Okay.
My bad.
Let's say it again.
Okay.
We already got the row.
And this for the video.
So I will see you in the next one.