Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed React Authentication!
You have completed React Authentication!
Preview
Letβs go over the key concepts you learned in this stage
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
This stage was all about setting
the foundation for React authentication.
0:00
Authentication is the process of
verifying the identity of a user.
0:04
It's often used in conjunction with
authorization, which is the process of
0:09
granting or denying access to a resource,
based on the authenticated identity.
0:14
So, in our case, a user must be logged
in to access the authenticated and
0:19
settings routes.
0:24
There are many authentication schemes, but
0:26
in this course,
we'll focus on basic authentication,
0:29
in which the user provides a user ID,
in our case, a username and password.
0:32
The user ID and password are paired and
0:38
encoded using Base64 before
being transmitted to the server.
0:41
Basic authentication is one of
the simplest forms of authentication to
0:46
set up, and will function as
a great building block for
0:50
you to try out other
authentication schemes.
0:53
Please remember that it should only
be used over a secure encrypted
0:57
connection such as HTTPS,
because the user's credentials
1:01
are transmitted over
the network in plain text.
1:05
Another potential security risk we
explored is the cross-origin HTTP request.
1:09
By default,
browsers restrict cross-origin requests.
1:15
So in order for the browser to allow
our front end to access resources from
1:18
the server, I added some code
to our server that supports
1:23
cross-origin resource sharing,
or CORS for short.
1:27
Now, that we've learned a bit about
authentication, and you're set up to code
1:32
along with me, let's get into
implementing basic authentication.
1:36
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up