WEBVTT

00:00.920 --> 00:02.520
For everyone.

00:03.000 --> 00:12.240
We already completed the authentication of the world chart and this video will be for the authorization.

00:12.800 --> 00:13.280
Okay.

00:13.920 --> 00:16.560
Firstly is the user schema.

00:16.920 --> 00:21.600
We need to provide one more prop we based.

00:21.960 --> 00:24.920
The rules will be screen.

00:24.960 --> 00:31.760
Okay I only do one row but users okay.

00:33.280 --> 00:41.480
For the one authorization I already have a course about us okay.

00:41.800 --> 00:45.480
This project only focus on the real time stuff.

00:46.000 --> 00:51.800
Just hand off of the social media.

00:52.160 --> 00:58.360
I will not leave that into the authorization in this project.

00:58.400 --> 01:05.590
Okay, I already have an advanced course for authentication and authorization.

01:05.870 --> 01:11.790
You can check about us and integrate into this project.

01:12.150 --> 01:14.510
It is very good exercise for you.

01:15.070 --> 01:15.430
Okay.

01:15.430 --> 01:17.590
Right now let's keep it simple.

01:18.510 --> 01:24.590
We have a problem with row restrict only last.

01:33.070 --> 01:43.870
And I think we can boost for simple user and Ahmed in here.

01:53.470 --> 01:59.950
Let's drop everything from the database right now.

02:06.650 --> 02:08.090
It's right here, actually.

02:11.410 --> 02:12.210
Right here.

02:12.330 --> 02:17.170
We can put the file will be user.

02:18.050 --> 02:18.570
Okay.

02:19.850 --> 02:22.050
The default row will be user.

02:24.810 --> 02:25.970
Now let me.

02:28.130 --> 02:29.570
Create again.

02:30.610 --> 02:36.730
But you can say right now we already add one more property.

02:37.170 --> 02:40.970
For that reason we need to customize the JSON web token a little bit.

02:41.330 --> 02:50.450
Because in this inside the JSON web token, we need to add a little bit of information about the authentication

02:50.450 --> 02:52.250
and authorization.

02:52.570 --> 03:03.650
Also right inside authentication service over here, the registration web account we will put a role

03:06.880 --> 03:07.360
Okay.

03:14.280 --> 03:18.160
And right here is that side also.

03:21.680 --> 03:22.160
Okay.

03:23.560 --> 03:29.880
And inside the global I use by lot we need to put a row also.

03:32.200 --> 03:34.920
And inside the.

03:37.240 --> 03:39.360
Glass right here.

03:40.280 --> 03:46.800
When we decoded user we will have a row.

03:49.600 --> 03:50.120
Okay.

03:50.840 --> 03:57.320
Let us use customize and let me sign up again.

03:59.360 --> 04:00.520
With this email.

04:04.440 --> 04:08.860
And let's say oh, sorry, I forgot.

04:10.180 --> 04:12.860
Remove the collections.

04:17.740 --> 04:23.140
I will drop this collection and I will say it again.

04:24.340 --> 04:25.060
Now right here.

04:25.060 --> 04:31.380
We already got the data we need to customize a little.

04:31.420 --> 04:32.020
Also.

04:35.140 --> 04:38.500
I use both the row.

04:38.940 --> 04:42.500
We will see what it will return the row.

04:43.020 --> 04:46.300
But right now if you check.

04:51.100 --> 04:52.180
These are the user.

04:53.820 --> 04:59.180
You will say we already got the row will be user by default right?

05:03.620 --> 05:06.660
Let me say one more time.

05:06.660 --> 05:06.690
Mokhtar.

05:09.810 --> 05:14.210
Okay, we got the role, so.

05:17.850 --> 05:19.090
Let me get a profile.

05:23.290 --> 05:23.810
We will.

05:23.810 --> 05:29.010
Got the ID name and email we need to customize.

05:52.010 --> 05:56.130
Let me say add a name and email.

06:09.590 --> 06:09.910
Mm.

06:26.430 --> 06:30.230
We don't have the row over here.

06:31.910 --> 06:34.990
Let me try to rework the JSON web token over here.

06:37.670 --> 06:38.910
Shall I go?

06:41.150 --> 06:42.750
And most likely.

06:46.870 --> 06:48.190
You will say we have.

06:50.710 --> 06:51.550
This guy.

06:56.070 --> 06:56.750
Okay.

06:59.510 --> 07:00.750
Let me draw.

07:03.110 --> 07:03.750
It.

07:05.750 --> 07:06.390
Insert.

07:06.390 --> 07:07.790
Go right here.

07:08.780 --> 07:12.060
And we asked this guy.

07:14.260 --> 07:15.940
Let me try to console.log.

07:15.980 --> 07:17.500
What is the user?

07:24.060 --> 07:27.340
We have a row, right?

07:27.420 --> 07:28.380
We have a row.

07:31.300 --> 07:34.100
Between in here we also got a row.

07:39.260 --> 07:40.900
Let me console.log current.

07:41.220 --> 07:43.780
Ah, I know the reason.

07:44.180 --> 07:47.660
The reason because there is one user right here.

07:47.700 --> 07:49.420
I completely forgot.

07:53.540 --> 07:57.220
So always there is more query row over here.

07:57.820 --> 07:58.380
Okay.

07:59.220 --> 07:59.860
My bad.

08:01.260 --> 08:02.100
Let's say it again.

08:02.340 --> 08:02.700
Okay.

08:02.700 --> 08:04.060
We already got the row.

08:04.500 --> 08:09.020
And this for the video.

08:09.700 --> 08:11.380
So I will see you in the next one.
