WEBVTT

00:00.480 --> 00:03.400
Are everyone in this video?

00:03.920 --> 00:09.400
We need to fix one more work related to the sign up and sign in.

00:09.560 --> 00:20.920
Okay, and this is just the optional because when we fix this book are not it doesn't really matter.

00:21.280 --> 00:21.800
Okay?

00:22.320 --> 00:34.720
But if we fix that book, we will mark the foreign developer will be easier in the future.

00:34.760 --> 00:45.080
Okay, so what is the book you can say when I say, what about I want to return from my own data over

00:45.080 --> 00:50.960
here, the avatar URL and cover photo, right.

00:50.960 --> 00:53.120
And also the biology over here.

00:53.480 --> 00:56.040
So that's what I want right now.

00:56.400 --> 01:04.990
So in order to do that, what we need to do after we generate the JSON web token, what we need to do.

01:05.710 --> 01:09.870
We need to create one more user service over here.

01:09.910 --> 01:10.230
Okay.

01:10.270 --> 01:22.630
Make sure you inject that and call the function to get current user and pass the user ID from here to

01:22.670 --> 01:23.030
here.

01:23.350 --> 01:24.150
And we will.

01:24.190 --> 01:24.830
Got that.

01:25.230 --> 01:30.750
Now as you can see we already have a function to get the current user over here.

01:30.910 --> 01:35.230
You can say okay these are the get current user.

01:36.190 --> 01:37.990
We need to change a little bit.

01:39.190 --> 01:44.310
We don't need to route the current user anymore.

01:44.350 --> 01:45.110
Is that up?

01:45.150 --> 01:50.070
You just need to put the user ID over here and the user ID over here.

01:50.110 --> 01:50.590
Okay.

01:51.310 --> 01:55.750
And uh, inside our.

01:55.870 --> 02:03.710
And when we change inside the service module we change that into the controller or also write.

02:08.180 --> 02:10.140
He found a user controller right here.

02:10.580 --> 02:12.140
These are the getcurrentuser.

02:14.820 --> 02:15.300
Here.

02:15.620 --> 02:18.100
We need to put the the ID over here.

02:18.140 --> 02:29.740
Okay, so with that what we will have the frontend developer easier okay.

02:30.180 --> 02:33.420
Make sure we remove the response user over here.

02:34.140 --> 02:45.100
And so after we already fixed that inside authentication controller inside the response we we don't

02:45.100 --> 02:49.020
need to use the response authentication DTO anymore.

02:49.180 --> 02:56.540
Instead you just need to call the response user DTO directly and it will return everything for you.

02:56.900 --> 02:57.340
Okay.

02:58.180 --> 03:00.660
So that's for the work.

03:00.700 --> 03:07.740
It will help the developer easier to handle the authentication in later.

03:07.900 --> 03:12.100
So that's it for the video and I will see you in the next.
