WEBVTT

00:01.280 --> 00:05.480
Now let's continue with the sign up.

00:05.960 --> 00:06.520
Okay.

00:07.040 --> 00:08.760
Let me go away and I will boost.

00:08.760 --> 00:10.680
Over here will be the side.

00:11.440 --> 00:14.680
So in okay this will be sign.

00:15.600 --> 00:17.360
And I think I will change the name.

00:22.640 --> 00:23.960
We will do the sign.

00:25.960 --> 00:27.720
Let's create a little.

00:28.400 --> 00:32.680
Let me copy the data over here and I will change to.

00:35.280 --> 00:39.480
Sign in video.

00:40.360 --> 00:42.440
And I'm not sure you can.

00:44.640 --> 00:46.240
Sign up video.

00:46.400 --> 00:51.400
I completely forgot that the Visual Studio Code.

00:51.440 --> 00:56.040
It will automatically generate the part for me.

00:58.080 --> 01:02.040
Well, let's go with the sign in.

01:02.280 --> 01:05.880
To sign in, we just need to email and password.

01:06.160 --> 01:06.640
Right.

01:09.320 --> 01:13.360
So right here I will change a little bit.

01:14.440 --> 01:16.120
Sign in detail.

01:19.280 --> 01:22.200
And make sure we change the class name.

01:29.040 --> 01:30.320
To resign video.

01:31.080 --> 01:39.840
And inside of it right here we will create our sign in.

01:41.840 --> 01:44.720
And actually right here we can change the sign up.

01:50.000 --> 01:50.760
To resign.

01:52.600 --> 01:57.600
So we will take a look at the sign in detail.

02:00.560 --> 02:01.800
Oh, sorry.

02:02.920 --> 02:03.600
My bad.

02:04.520 --> 02:05.200
Right here.

02:06.040 --> 02:07.150
So in this your.

02:11.710 --> 02:12.430
Room now.

02:12.470 --> 02:14.390
What we need to do is this guy.

02:15.830 --> 02:21.110
Firstly, we need to find user by email.

02:21.750 --> 02:22.270
Okay.

02:22.670 --> 02:27.310
After we already got the user, we will check for password.

02:28.390 --> 02:28.750
Okay.

02:28.750 --> 02:29.910
We will check the password.

02:29.950 --> 02:31.430
We match or not.

02:31.950 --> 02:34.870
So this only shows that.

02:36.270 --> 02:39.110
And lastly we will generate JSON web token.

02:40.150 --> 02:42.790
Now let me find the user by email.

02:44.670 --> 02:51.750
Finally we will create user figure out why this dot.

02:54.750 --> 02:55.310
What?

02:56.470 --> 02:57.190
Right now.

02:57.990 --> 03:03.750
Uh, we already got user module directly from user service, right?

03:04.430 --> 03:13.270
So this guy let me do something like here Not five one and I will use the email.

03:15.630 --> 03:17.790
We can reach out to us.

03:33.230 --> 03:36.190
If we don't have any user.

03:36.470 --> 03:49.870
We will draw new North Eastern Railway user profile symbol letters and we need to check for the password.

03:49.910 --> 03:50.310
Right.

03:50.350 --> 03:52.510
In order to check for the password.

03:52.830 --> 03:59.350
Let's take a look at the documentation inside the encryption and hashing.

04:01.030 --> 04:05.550
Click on hashing right here in order to compare the password.

04:05.870 --> 04:11.310
We will use the Pycrypto compare and boost the plaintext work.

04:11.710 --> 04:14.700
Okay this is the And this is the hash password.

04:18.020 --> 04:19.220
I will provide it.

04:19.260 --> 04:19.780
Match.

04:19.820 --> 04:20.220
Equal.

04:20.260 --> 04:20.660
Why?

04:23.540 --> 04:24.780
Not compare.

04:27.100 --> 04:28.180
With a password.

04:28.940 --> 04:31.220
And what's a.

04:34.740 --> 04:35.500
Hash symbol?

04:35.860 --> 04:37.740
It will come from the user, right?

04:38.020 --> 04:39.900
User does not work over here.

04:42.420 --> 04:43.340
Okay, guys.

04:43.540 --> 04:44.860
And we need to check.

04:47.020 --> 04:48.420
If we.

04:52.220 --> 04:56.620
Don't match the password, we will return.

04:56.660 --> 05:00.420
Actually right here I will change return a little bit.

05:00.460 --> 05:02.420
We will pass three.

05:02.620 --> 05:03.260
Very sure.

05:04.260 --> 05:04.740
Okay.

05:07.420 --> 05:09.260
And now we need to the rest.

05:11.580 --> 05:13.620
So let's open the sign up.

05:14.180 --> 05:16.860
And I will copy is the car over here?

05:21.540 --> 05:22.420
Moreover here.

05:24.980 --> 05:30.260
And real name is to the user and access token.

05:30.820 --> 05:37.340
And let's recall we will return the user and access token.

05:38.220 --> 05:41.300
But right here we return the same user.

05:41.340 --> 05:41.900
Right.

05:42.660 --> 05:43.020
Hmm.

05:43.620 --> 05:51.860
I think right now we will need to rename it a little bit will be the user and we will fix the interceptor

05:51.900 --> 05:52.500
also.

05:53.500 --> 05:54.020
Right.

05:54.060 --> 05:58.700
Right here we will rename it to the user over here.

06:06.420 --> 06:08.180
And let's test that.

06:22.850 --> 06:27.650
I will remove the name and chain in order.

06:27.650 --> 06:28.570
Sign in.

06:29.970 --> 06:30.890
Now let's test.

06:31.450 --> 06:32.290
I will close.

06:32.930 --> 06:37.650
Now it's already written for me, right?

06:39.010 --> 06:42.490
Uh, data and access token also.

06:45.690 --> 06:46.170
Right.

06:51.210 --> 06:52.370
Let me test.

06:54.810 --> 06:57.650
Uh, invalid email.

06:58.330 --> 07:00.570
It will return the best credential.

07:01.050 --> 07:01.770
Very good.

07:03.570 --> 07:04.410
Say it again.

07:04.450 --> 07:05.490
It's already working.

07:05.530 --> 07:06.970
Let me take the signup again.

07:07.010 --> 07:08.690
It's, uh, work or not?

07:10.330 --> 07:10.850
Okay.

07:10.850 --> 07:12.210
It's already work.

07:12.650 --> 07:13.970
So that is.

07:14.250 --> 07:17.050
That's how we can sign up and sign in.

07:17.570 --> 07:22.610
I hope you understand this video, and I will see you in the next one.
