WEBVTT

00:00.520 --> 00:02.800
Are everyone in this video?

00:03.440 --> 00:06.480
We will fix the getcurrentuser.

00:07.000 --> 00:09.840
Before that, let me remove the server epochs.

00:11.480 --> 00:20.360
Well, the reason we need to fix that because right here if I click on Get Profile and I will copy the

00:20.360 --> 00:24.080
access token over here Buddhas.

00:24.760 --> 00:36.800
And if I click send you can say I only update the name email or okay I want it to show on up information.

00:37.760 --> 00:38.080
Okay.

00:38.160 --> 00:39.560
So how we can do that.

00:40.160 --> 00:45.400
We cannot move that inside the current user decorator okay.

00:46.000 --> 00:47.880
Let me show you one strategy.

00:48.680 --> 00:49.400
If you.

00:56.880 --> 00:59.280
Insert a GA authentication graph.

00:59.560 --> 01:02.120
We already attached the user okay.

01:03.000 --> 01:10.640
Right here you might think we need to update the some biology but they or something like that over here.

01:11.980 --> 01:15.380
And fixed the authentication service.

01:16.060 --> 01:18.260
When we generate the access token.

01:18.700 --> 01:19.260
Okay.

01:19.820 --> 01:22.860
We will need to boot the biology over here.

01:23.460 --> 01:25.500
But that's not the solution.

01:26.420 --> 01:35.700
The reason because the chapter only contains some fields for authentication and authorization.

01:36.100 --> 01:36.420
Okay.

01:36.460 --> 01:43.980
It means in the user right here we only need to put the email arrow and ID okay.

01:44.260 --> 01:48.340
And the name right here you you can think is not important.

01:48.660 --> 01:51.100
We can remove that if you don't want.

01:52.980 --> 01:53.540
Okay.

01:53.980 --> 01:59.620
But I think the name right here is used very much in the application.

01:59.620 --> 02:02.420
So we can feel free to put that.

02:02.460 --> 02:02.980
Okay.

02:03.540 --> 02:10.060
But don't try to put everything schema or property inside the user object.

02:11.900 --> 02:15.020
It will not affect it at all.

02:16.620 --> 02:18.340
So much for us.

02:18.700 --> 02:23.160
So for that reason in this guy is the a user or a controller?

02:23.200 --> 02:24.080
Instead of.

02:26.960 --> 02:27.680
Right here.

02:36.160 --> 02:43.880
Which creates the Soviet forget current user.

02:44.080 --> 02:44.440
Okay.

02:44.440 --> 02:45.800
Right now let's remove that.

02:46.640 --> 02:49.520
Let me move this here and insert here.

02:49.560 --> 02:58.160
I will create a service called AC get current user.

03:02.200 --> 03:02.680
Okay.

03:04.080 --> 03:08.880
And uh right here we save the current user.

03:09.560 --> 03:14.640
But right now we remove the current user over here.

03:19.800 --> 03:21.120
I use a bylaw.

03:21.800 --> 03:22.320
Okay.

03:24.000 --> 03:27.960
And from here let's create a user.

03:28.360 --> 03:31.000
Click on this dot.

03:33.740 --> 03:40.140
User model profile ID and model current user ID over here.

03:40.860 --> 03:41.380
Okay.

03:41.900 --> 03:43.740
And we can add a little bit of chat.

03:57.180 --> 03:57.780
User.

03:59.420 --> 03:59.980
Okay.

04:01.180 --> 04:03.500
So we go back to the controller.

04:30.260 --> 04:32.020
Let me get profile again.

04:33.540 --> 04:34.020
Okay.

04:34.020 --> 04:39.700
Right now it's already worked and that's what we want okay.

04:39.940 --> 04:43.900
So I hope you understand this video I will see you in the next one.
