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.
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
Nice work so far,
you've come a long way in this stage.
0:00
You started off by implementing
the user registration feature.
0:03
You gathered the user's information,
then provided it to the fetch method so
0:07
that the user could be
added to the server.
0:12
You handled any response from the server,
0:15
no matter if it was a 201,
400, or any other status.
0:18
Furthermore, you displayed
validation errors when necessary.
0:23
You kept it going by using the basic
authentication scheme to authenticate
0:27
a user.
0:32
You took the user's credentials,
encoded them using base 64, and
0:32
passed them to the authorization
request header.
0:37
Similarly to the user registration,
you handled all responses from the server,
0:41
200, 401, or any other status.
0:46
You store the authenticated
user's info in a context.
0:50
Passing this context to components
allowed you to display custom content
0:54
to users.
0:58
For example, the links in the navigation
bar differ, depending on whether or
0:59
not the user is logged in.
1:03
You even improve the user's experience by
signing them in right after they register.
1:06
The basic authentication scheme is
all set up on the client side, but
1:11
there's more work left
to do in our React app.
1:15
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