WEBVTT

0
00:00.300 --> 00:03.390
All right, guys, welcome to a brand new module.

1
00:03.420 --> 00:08.640
And in this module, we're going to tackle the topic of authentication.

2
00:09.030 --> 00:15.290
And it's something that is often thought of as incredibly complicated, but it doesn't have to be.

3
00:15.330 --> 00:21.750
And we're going to take it step by step from beginning to end so that you get an overview of the entire

4
00:21.750 --> 00:24.510
process of setting up authentication from scratch.

5
00:25.230 --> 00:27.610
So why do we need to authenticate?

6
00:28.110 --> 00:35.730
Well, as we're creating our website or web app for users to use, then these users are going to start

7
00:35.730 --> 00:38.430
generating data in the website.

8
00:38.730 --> 00:40.710
They might like certain posts,

9
00:40.920 --> 00:43.080
they might interact with other users,

10
00:43.230 --> 00:46.880
there might be messages created or recipes created.

11
00:46.920 --> 00:49.860
There's always going to be some user data created.

12
00:50.400 --> 00:57.150
And in order to associate those pieces of data with individual users, we need to create an account

13
00:57.150 --> 01:02.610
for each user. So that they would sign up to our website using a username and a password

14
01:02.910 --> 01:09.450
and we would essentially create kind of like an ID card for them to uniquely identify them on our database

15
01:09.750 --> 01:14.520
and to save all of the data that they generate onto that account.

16
01:15.060 --> 01:20.670
So the next time that they come back onto the website, they'll be able to use their username and password

17
01:21.000 --> 01:28.110
and log in to our website and be able to access all of those possibly private pieces of information.

18
01:28.470 --> 01:33.510
So this way, you don't end up with everybody being able to see, you know, what private messages you're

19
01:33.510 --> 01:37.280
sending around on Facebook or see your direct messages on Twitter.

20
01:37.650 --> 01:39.030
So that's pretty simple.

21
01:39.270 --> 01:45.420
Now, the other reason why you might want to add authentication to your website is to restrict access

22
01:45.630 --> 01:49.770
to certain areas of the website depending on the status of the user.

23
01:50.040 --> 01:57.570
So, for example, if you were Spotify or Netflix and you charge a subscription for accessing certain

24
01:57.570 --> 02:03.210
parts of the website, then once the user pays, you have to update their account in your database to

25
02:03.210 --> 02:09.930
say that they have paid and they'll be allowed to access the TV shows or songs that they're entitled

26
02:09.930 --> 02:10.230
to.

27
02:10.770 --> 02:16.550
So those are some of the reasons why you might want to add authentication to your website.

28
02:16.860 --> 02:21.030
But authentication can be done in a number of ways.

29
02:21.030 --> 02:27.690
Creating a website where we sign up and log in users seems simple enough, but the difficult part of

30
02:27.690 --> 02:32.750
authentication comes from how secure you're going to make your website.

31
02:32.840 --> 02:38.100
But so we're going to learn how to progress from essentially a website that's basically secured with

32
02:38.100 --> 02:45.210
a Cheeto to something that is a lot more serious and more consistent with industry standards of good

33
02:45.210 --> 02:46.810
security on a website.

34
02:47.160 --> 02:50.600
So the structure of our website is really, really simple.

35
02:51.000 --> 02:59.760
It has a homepage which has two buttons that allows you to either go towards register or go towards

36
02:59.760 --> 03:00.300
login.

37
03:00.480 --> 03:06.120
And once the user has been registered or logged in and they have been authenticated, then they are

38
03:06.150 --> 03:08.630
able to access the secrets page.

39
03:09.150 --> 03:15.090
So I've kept the remainder of the website pretty simple because we're going to be focusing on a pretty

40
03:15.090 --> 03:16.130
complex topic.

41
03:16.230 --> 03:23.010
So I've created some starting files for you to download so that we can focus our efforts on learning

42
03:23.010 --> 03:27.160
authentication and not get distracted by things like bootstrap and styling.

43
03:27.600 --> 03:33.750
So once you're ready, head over to the next lesson and download the starting files, and then we're going

44
03:33.750 --> 03:35.940
to get started with authentication.

45
03:36.270 --> 03:37.350
So I'll see you there.