1
00:00:00,540 --> 00:00:01,050
Wonderful.

2
00:00:01,560 --> 00:00:09,630
And once we're done setting up logging now, I want to set up that middle point, the one where we verify

3
00:00:10,260 --> 00:00:10,980
the email.

4
00:00:11,930 --> 00:00:19,910
And if everything is correct, then we set is verified through the verification date and set back the

5
00:00:19,910 --> 00:00:22,610
verification token to an empty string.

6
00:00:22,880 --> 00:00:26,960
And that way we can go back through a login and start using it.

7
00:00:27,620 --> 00:00:29,600
And first, here's what I want you to do.

8
00:00:29,990 --> 00:00:34,100
Go to auth controller and create another one.

9
00:00:34,400 --> 00:00:38,630
Create Verify email controller in there.

10
00:00:38,930 --> 00:00:43,460
For now, just look for verification, token and email.

11
00:00:43,460 --> 00:00:46,160
Interact that body and send it back.

12
00:00:46,490 --> 00:00:54,440
So that way, we will be able to test it in a postman, then hop over to a auth route and create a new

13
00:00:54,440 --> 00:00:54,680
one.

14
00:00:55,280 --> 00:01:02,960
So, of course, export of a controller and in their imported and set it equal to verify the email and

15
00:01:02,960 --> 00:01:05,120
then let's test it in a post manner.

16
00:01:05,630 --> 00:01:09,510
So first, what is my controller and my apologies?

17
00:01:09,530 --> 00:01:13,220
I have plenty of projects open.

18
00:01:13,460 --> 00:01:17,960
So let's go here to our controller and.

19
00:01:19,100 --> 00:01:23,120
I have registered great, awesome, and I'm going to put it in between.

20
00:01:23,420 --> 00:01:26,460
By way, we kind of see that it's a mental state.

21
00:01:26,480 --> 00:01:27,470
Now you don't have to.

22
00:01:27,680 --> 00:01:31,830
You can put it somewhere at the end or on the top doesn't really matter.

23
00:01:31,850 --> 00:01:36,890
So I'm going to go here with verify email and it's going to be a sink.

24
00:01:37,070 --> 00:01:38,680
It's going to be Iraq and the rise.

25
00:01:39,070 --> 00:01:46,790
And like I said, first, we'll start by checking for two things for verification token as well as email

26
00:01:46,790 --> 00:01:47,870
and direct that body.

27
00:01:47,990 --> 00:01:52,460
Now, eventually, this is going to be sent from our front end.

28
00:01:53,470 --> 00:01:59,980
There's going to be a functionality that will send that for us, but as far as the postman, yes, we'll

29
00:01:59,980 --> 00:02:01,790
have to manually provide those two things.

30
00:02:01,790 --> 00:02:05,410
So let's go here with Konst and that verification token.

31
00:02:05,660 --> 00:02:11,890
And the reason why I'm using this name is because it's just easier since that is what we're sending

32
00:02:11,890 --> 00:02:12,400
back here.

33
00:02:12,790 --> 00:02:13,150
Correct.

34
00:02:13,310 --> 00:02:14,530
So it's just going to be faster.

35
00:02:15,180 --> 00:02:21,100
And I also want to set up the email and both of those things that are going to be in that body.

36
00:02:21,460 --> 00:02:25,840
And then as far as response, eventually we'll just send back the message.

37
00:02:26,110 --> 00:02:28,270
Email verified if everything is correct.

38
00:02:28,660 --> 00:02:34,260
But for now, we'll do a long route where all gold reserve status first codes.

39
00:02:34,490 --> 00:02:36,760
OK, I'm not Jason.

40
00:02:37,420 --> 00:02:40,780
Then inside of the Jason, but send both of those things back.

41
00:02:41,080 --> 00:02:43,540
So that way we know, okay, everything works now.

42
00:02:43,540 --> 00:02:48,190
If you want, you can log here and send back the message that's really up to you.

43
00:02:48,610 --> 00:02:49,060
My guess?

44
00:02:49,060 --> 00:02:50,260
I'll just send it back.

45
00:02:50,530 --> 00:02:51,340
Let's scroll down.

46
00:02:51,550 --> 00:02:53,500
Remember, we do need to export.

47
00:02:53,980 --> 00:02:55,630
So let's go with verifying email.

48
00:02:56,680 --> 00:03:01,330
We'll hop over to where we were all throughout.

49
00:03:01,600 --> 00:03:01,990
Correct.

50
00:03:02,620 --> 00:03:03,790
I want to get my verify.

51
00:03:04,600 --> 00:03:05,280
So verify your.

52
00:03:05,980 --> 00:03:10,110
And since in this case, I was using that post.

53
00:03:10,720 --> 00:03:12,610
I'll just stick to that approach.

54
00:03:12,940 --> 00:03:16,960
If you're using router dot root fine, of course you use that approach.

55
00:03:17,440 --> 00:03:19,360
It's irrelevant where you place it over here.

56
00:03:19,840 --> 00:03:20,470
So my guess?

57
00:03:20,470 --> 00:03:27,520
I'm just going to go router one post, so it's going to be a poster out and then I want to go with forward

58
00:03:27,520 --> 00:03:31,270
slash and then verify hyphen email.

59
00:03:32,230 --> 00:03:33,430
And this is important.

60
00:03:33,550 --> 00:03:36,190
Make sure that the name is exact.

61
00:03:36,550 --> 00:03:43,320
Whichever setup you prefer, whether you go the route or not, route and then post or this one router,

62
00:03:43,820 --> 00:03:47,110
that's irrelevant, what is important is the verb.

63
00:03:47,500 --> 00:03:54,730
So the method we're using as well as the URL because prompter is going to be looking for that value.

64
00:03:55,090 --> 00:03:59,710
Let's add a comma and let's go verify your email.

65
00:04:00,520 --> 00:04:05,850
And now, once everything's in place, like I said, we'll start testing everything in the post, man.

66
00:04:06,250 --> 00:04:10,400
So let's navigate there and we'll set up a new route.

67
00:04:10,450 --> 00:04:14,050
Don't worry, there's not going to be that many routes after this one.

68
00:04:14,340 --> 00:04:16,300
So let's go here with ad request.

69
00:04:16,779 --> 00:04:18,910
It's going to be a poster quest.

70
00:04:19,360 --> 00:04:21,220
We are looking for a verify email.

71
00:04:21,850 --> 00:04:24,010
So let's go again here with the URL.

72
00:04:24,980 --> 00:04:28,370
Band forward slash we're looking for.

73
00:04:28,880 --> 00:04:34,280
Also, I believe correct, and we have verified email as far as the body.

74
00:04:34,730 --> 00:04:37,910
Well, let me get back my values correct.

75
00:04:38,150 --> 00:04:44,120
So when I register a new user, in this case, I'm going to go with beta.

76
00:04:45,250 --> 00:04:49,960
And I say yes, for now, we'll have to the lead few users.

77
00:04:50,620 --> 00:04:53,600
That's unfortunate, but that's what we'll have to do.

78
00:04:53,620 --> 00:04:55,450
So that's my verification token.

79
00:04:55,720 --> 00:04:57,160
This is what I'll send back.

80
00:04:57,670 --> 00:04:59,560
And I also want to go with email.

81
00:04:59,710 --> 00:05:00,730
So let me go here.

82
00:05:01,340 --> 00:05:09,430
Let me write, verify, email, verify email, and then I'm going to go for Jason.

83
00:05:10,220 --> 00:05:15,160
And let's send back the verification token as well as the.

84
00:05:16,310 --> 00:05:18,770
Email, so in this case, is this one?

85
00:05:18,980 --> 00:05:19,400
Correct?

86
00:05:19,850 --> 00:05:21,110
So let's go back over here.

87
00:05:21,440 --> 00:05:22,700
Copy and paste.

88
00:05:22,820 --> 00:05:29,120
And like I said, either you can log it online, just send back the message or notice and actually get

89
00:05:29,120 --> 00:05:37,460
back my verification token, which like I keep repeating, eventually we'll send using the email and

90
00:05:37,760 --> 00:05:42,980
we will send it to a listener out using the frontend.

91
00:05:42,980 --> 00:05:44,930
But for now, we're just doing that manually.

92
00:05:45,320 --> 00:05:51,020
We have the token as well as the email, so now we just need to set up a verify functionality.

