1 00:00:00,240 --> 00:00:06,510 In the last few videos, we have made complete changes on the back and not to generate the beauty tokens 2 00:00:06,510 --> 00:00:13,740 and we are also sending the generator JWT token inside the response as a header value with the name 3 00:00:13,740 --> 00:00:13,920 of. 4 00:00:14,700 --> 00:00:21,840 So now in this video, let's try to make some changes on the client application side as well to capture 5 00:00:21,840 --> 00:00:22,620 that value. 6 00:00:22,800 --> 00:00:28,770 And at the same time, for all future requests that this application is going to make for successful 7 00:00:28,770 --> 00:00:29,250 logging. 8 00:00:29,250 --> 00:00:36,360 And we have to make sure that we are passing the same gwg token inside the request to the backend so 9 00:00:36,360 --> 00:00:42,540 the backend can validate every time we pass a request to prove our authentication and authorization. 10 00:00:42,750 --> 00:00:45,870 So I'm at the logging company in tortillas. 11 00:00:46,090 --> 00:00:52,470 Yeah, this is the place where the login of the user will happen by communicating to the backend. 12 00:00:52,680 --> 00:01:00,990 Once I get the response from the back end, what I can do is can populate the Thracian JWT token on 13 00:01:00,990 --> 00:01:07,740 the order of the response and put it into the station storage with the value alteration. 14 00:01:07,980 --> 00:01:14,190 So now my operation value is inside the shared storage, my browser. 15 00:01:14,430 --> 00:01:21,060 But in order to send the same value every time I'm making a request to the back and I have to make a 16 00:01:21,060 --> 00:01:29,730 change inside the interceptor file that we have written for the CSR of tokens before that, since we 17 00:01:29,730 --> 00:01:37,680 have removed all the CSR related stuff on the backend, we can remove on the front end, also not storing 18 00:01:37,680 --> 00:01:38,990 that value no more. 19 00:01:39,180 --> 00:01:41,190 Now I'll go to the interceptor file. 20 00:01:41,540 --> 00:01:50,850 I'm going to remove the CSR of related port and add a code which will add our authorization JWT token 21 00:01:50,850 --> 00:01:54,210 every time to the back end when a request is happening. 22 00:01:54,360 --> 00:01:58,350 So here you can see I'm trying to get that value from the storage. 23 00:01:58,500 --> 00:02:07,490 If it is not null, I'm sending in the request at the with the value alteration and it's a token value. 24 00:02:07,500 --> 00:02:13,650 So this will make sure that I'm sending my same JWT token every time to that back. 25 00:02:14,160 --> 00:02:19,740 So now let's try to start the service both on the front end and the back end and try to test how this 26 00:02:19,750 --> 00:02:21,810 JWT tokens are working in the next room. 27 00:02:22,110 --> 00:02:22,590 Thank you. 28 00:02:22,590 --> 00:02:24,600 And see you in the next lecture by.