WEBVTT

00:00.840 --> 00:01.440
Park.

00:01.560 --> 00:09.640
Everyone in this section, we will do the authentication for the next project.

00:10.400 --> 00:19.640
Okay, so before we do that, let's go to the schema and we have a username name and password.

00:20.080 --> 00:20.640
Right.

00:23.160 --> 00:26.560
I think I will boost one more thing with the.

00:30.080 --> 00:30.680
Email.

00:36.760 --> 00:37.720
To registry.

00:38.920 --> 00:39.520
Okay.

00:44.040 --> 00:48.080
And I think we don't list the username right now.

00:48.120 --> 00:49.440
Let me remove that.

00:53.280 --> 01:06.020
So after we already have a schema we need to create the folder structure for the authentication.

01:06.300 --> 01:14.340
Actually, you can create us directly inside the user service, but I think the best way is separate.

01:14.380 --> 01:15.740
Another thing.

01:16.540 --> 01:26.900
So I will open a new terminal and next generate resource with the authentication.

01:27.700 --> 01:30.340
And Maxwell will use the nodes.

01:31.980 --> 01:34.140
So remove.

01:36.340 --> 01:41.260
The test for the rest API.

01:41.500 --> 01:42.020
Yes.

01:42.900 --> 01:44.820
And we already create us.

01:48.300 --> 01:49.020
Right here.

01:49.500 --> 01:52.780
We don't list the schema or the entity.

01:53.300 --> 01:58.780
Let's remove that because we will reuse the schema from the user.

01:59.100 --> 01:59.580
Okay.

02:01.780 --> 02:07.060
We already have a our module and controller.

02:11.240 --> 02:19.800
What we need to do right now is that the authentication service, we have a little write in, a little

02:19.800 --> 02:20.520
right here.

02:21.040 --> 02:25.280
I will boost the in order to sign up.

02:25.720 --> 02:26.040
Okay.

02:26.080 --> 02:28.080
This is sign up detail.

02:28.360 --> 02:28.920
Right.

02:29.600 --> 02:36.840
I will rename it a little bit sign up detail and I will the name.

02:38.880 --> 02:41.760
Email and password.

02:46.240 --> 02:47.040
Is are here.

02:47.880 --> 02:54.360
Let me import the sign up detail and sign up.

02:54.560 --> 02:55.200
Little.

02:58.600 --> 03:03.400
In size and service right here.

03:04.440 --> 03:05.600
What we need to do.

03:07.280 --> 03:13.010
We need to create a new User, right?

03:13.050 --> 03:24.570
So for a reason, let's color is another way to say how we can create a new data.

03:26.930 --> 03:33.250
If you scroll a bit, you will say in order to create the data we will use this syntax.

03:33.410 --> 03:39.090
Firstly we need to inject the model into the submit okay.

03:39.130 --> 03:42.490
We will inject the repository into the service.

03:42.690 --> 03:45.210
Let me be never in my life.

03:45.250 --> 03:46.970
I remember this line.

03:47.010 --> 03:47.490
Okay.

03:49.650 --> 03:50.450
That's over here.

03:50.970 --> 03:52.770
And we will inject right here.

03:53.690 --> 04:03.570
And let's invoke the user dot name and invoke the model and the model user also.

04:04.090 --> 04:04.530
Okay.

04:04.530 --> 04:07.650
We already have a user model.

04:09.690 --> 04:14.610
Well in order to create that we will be using this way right.

04:16.190 --> 04:20.590
This dot model and both the digital.

04:40.870 --> 04:43.310
Also, we don't have a career.

04:44.110 --> 04:44.670
Okay.

04:46.270 --> 04:55.470
And right here we have the user and we can return the library the user right here.

04:58.030 --> 04:58.630
Okay.

04:59.070 --> 05:01.910
And after that let's go to the controller.

05:02.670 --> 05:14.790
We will remove an inbox sign up DTO and rename it to sign up with zero also.

05:17.110 --> 05:20.410
And let's test that Smart move or not.

05:21.970 --> 05:22.650
All right.

05:22.650 --> 05:31.810
Here we have an error update video right here I will remove the video from update okay.

05:32.090 --> 05:32.770
Remove that.

05:33.130 --> 05:42.330
And inside the controller also we will remove the update over here.

05:48.330 --> 05:54.570
And we got one more error from the Soviet flight over the Soviet last.

06:04.890 --> 06:10.450
Update here we got the error from the net JS.

06:10.890 --> 06:14.330
The reason because right here we already inject the service.

06:14.730 --> 06:20.290
But inside our module we doesn't import the.

06:22.690 --> 06:28.270
Module three the Mongols from here, right.

06:28.550 --> 06:36.630
The first way we can fix that is open the user module and we will copy the import statement over here.

06:37.670 --> 06:38.030
Okay.

06:38.030 --> 06:39.750
We can import us like this.

06:52.470 --> 06:52.910
Here.

06:55.830 --> 07:02.510
And after we invoke the regex application will be successfully started.

07:02.550 --> 07:03.030
Right.

07:05.590 --> 07:06.310
Right here.

07:08.670 --> 07:10.270
Let me create.

07:14.030 --> 07:14.950
The request.

07:20.150 --> 07:26.270
And let's see what is the controller inside the authentication controller.

07:26.960 --> 07:27.960
Inside here.

07:29.520 --> 07:37.040
What I want right now, I want to bust the slide up.

07:37.760 --> 07:38.280
Okay.

07:39.640 --> 07:43.040
I want to would you like us?

07:48.480 --> 07:56.200
To click on drawers to Jason Fuller will be the name.

08:01.200 --> 08:01.840
Email.

08:08.320 --> 08:09.400
And password.

08:14.520 --> 08:14.960
So.

08:18.320 --> 08:25.880
It's written some stuff like last let's say why is.

08:36.140 --> 08:36.700
The reason?

08:36.700 --> 08:41.540
Because I forgot the method.

08:42.580 --> 08:44.300
Let me say okay.

08:44.300 --> 08:47.220
Right here is already create a new data.

08:47.380 --> 08:47.860
Right.

08:48.100 --> 08:52.180
Let me rename the request will be sign up.

08:54.380 --> 09:05.940
So just for the video about how to add the user into the database.

09:06.380 --> 09:13.780
You can say in order to that we just need to call the user model like that okay.

09:17.780 --> 09:22.900
And in the next video we will deep dive into the setup method.

09:24.140 --> 09:31.020
Right now let's understand how we can create the data in the database.

09:31.540 --> 09:33.380
That will be enough right now.

09:33.740 --> 09:35.540
So I will see you in the next one.
