1
00:00:00,240 --> 00:00:06,150
Okay, before we move on and set up the get current user old.

2
00:00:06,360 --> 00:00:08,580
Let's also that's the expiration.

3
00:00:09,090 --> 00:00:13,410
At this point, I have showed you, I think, a few times where I basically remove the cookie.

4
00:00:13,410 --> 00:00:15,300
But now let me showcase what.

5
00:00:15,950 --> 00:00:19,610
Actually happens once the cookie expires.

6
00:00:19,700 --> 00:00:26,240
And in order to test it, I'm just going to go to utils function and I'll change from one day to 5 seconds.

7
00:00:26,330 --> 00:00:30,440
I'll log in and I'll show you what happens after 5 seconds.

8
00:00:30,740 --> 00:00:32,750
So let's go to attach cookies.

9
00:00:32,780 --> 00:00:33,680
I'll leave them one day.

10
00:00:33,710 --> 00:00:35,150
Of course I'll go back.

11
00:00:35,690 --> 00:00:39,080
Once we test that out, then let's say 5 seconds.

12
00:00:39,170 --> 00:00:42,170
Now, again, we want to register because we want to get the new one.

13
00:00:42,200 --> 00:00:46,790
Keep in mind, the cookie that right now is present has the previous expiration.

14
00:00:46,790 --> 00:00:47,060
So.

15
00:00:47,060 --> 00:00:47,810
Yes, yes.

16
00:00:47,810 --> 00:00:49,490
We always need to start from scratch.

17
00:00:49,490 --> 00:00:50,660
So let's go again.

18
00:00:51,590 --> 00:00:52,750
With the failures.

19
00:00:52,760 --> 00:00:58,790
Now we should get that five second one, the one that expires in 5 seconds.

20
00:00:59,330 --> 00:01:03,010
And I'm just going to be extremely annoying and I'm just going to count to five.

21
00:01:03,020 --> 00:01:06,980
So one, two, three, four, five.

22
00:01:07,920 --> 00:01:09,230
We should be done.

23
00:01:09,240 --> 00:01:11,520
And then notice technically everything works.

24
00:01:11,520 --> 00:01:17,570
I can even go to roots and all that, but the moment I'm going to go back to the start, this is when

25
00:01:17,580 --> 00:01:20,430
we again send back that cookie, correct?

26
00:01:20,520 --> 00:01:26,250
Because we right away set up that request and you'll see since our cookie has expired.

27
00:01:27,000 --> 00:01:28,710
Pam will be logged out right away.

28
00:01:28,710 --> 00:01:30,570
So let's go back to Stats N Yep.

29
00:01:31,550 --> 00:01:33,700
We cannot see the application anymore.

30
00:01:33,710 --> 00:01:33,970
Why?

31
00:01:33,980 --> 00:01:36,440
Well, because we get back the 401.

32
00:01:36,440 --> 00:01:38,030
Or you can clearly see that.

33
00:01:38,180 --> 00:01:39,640
So we get the four one.

34
00:01:39,650 --> 00:01:43,790
Our interceptor still works and we right away lock out to user.

35
00:01:43,910 --> 00:01:47,020
So let me go back to attach cookies.

36
00:01:47,040 --> 00:01:48,950
I'm going to go back to that one day.

37
00:01:49,460 --> 00:01:51,860
This is again, just to give you an idea of what happens.

38
00:01:51,860 --> 00:01:54,230
And yes, let me log in one more time.

39
00:01:54,230 --> 00:01:59,390
Otherwise, I know that I'm going to basically keep that one and I'll wonder why nothing works.

40
00:01:59,390 --> 00:02:03,770
So now again, our expiration is that one day.

