In this workshop, we'll learn how to implement authentication and authorization in a Full Stack Web Application. You'll learn the foundational technologies at play and built upon it to include complicated user auth flows and more.
Here are some resources you can read before taking the workshop to get you up to speed on some of the tools and concepts we'll be covering:
All of these must be available in your PATH
. To verify things are set up
properly, you can run this:
git --version
node --version
npm --version
If you have trouble with any of these, learn more about the PATH environment variable and how to fix it here for windows or mac/linux.
This is a pretty large project (it's actually many apps in one) so it can take several minutes to get everything set up the first time. Please have a strong network connection before running the setup and grab a snack.
Warning
This repo is very large. Make sure you have a good internet connection before you start the setup process. The instructions below use
--depth
to limit the amount you download, but if you have a slow connection, or you pay for bandwidth, you may want to find a place with a better connection.
Follow these steps to get this set up:
git clone --depth 1 https://github.com/epicweb-dev/web-auth.git
cd web-auth
npm run setup
If you experience errors here, please open an issue with as many details as you can offer.
You'll find all the exercises in the exercises
directory. The structure of the
workshop apps is described below, but most of the time you should be able to
simply run the app and navigate around the different exercises using the
application (there are even buttons to open the right exercise file right in
your editor).
The purpose of the exercise is not for you to work through all the material. It's intended to get your brain thinking about the right questions to ask me as I walk through the material.
To get the app up and running (and really see if it worked), run:
npm start
Now open your browser to the address that's logged out for you and you're good to get started!
The test script in the package.json
runs the tests on the solutions (these
should all pass). To run the tests against your own work, you simply open the
problem page and click the "Test" tab.
The application has several buttons which will launch your editor to the right file. There are a lot of files in this workshop so you'll be using this feature a lot to get to the right place at the right time.
This should just workβ’οΈ, but if it doesn't it could be that our editor guessing
isn't working for you. If that's the case, create a .env
file in the root of
this project and add an environment variable called EPICSHOP_EDITOR
with the
value being set to the path to your editor's executable. For example, if you're
using VS Code on Windows, you'd add this to your .env
file:
EPICSHOP_EDITOR="C:\Program Files\Microsoft VS Code\bin\code.cmd"
Make certain that if the path includes spaces that you wrap the path in quotes as above.
exercises/*.*/README.md
: Exercise background informationexercises/*.*/*.problem.*/README.*.md
: Problem Instructionsexercises/*.*/*.problem.*/*.tsx
: Exercise with Emoji helpers π You spend
most of your time here.exercises/*.*/*.solution.*/*.tsx
: Solved versionThe purpose of the exercise is not for you to work through all the material. It's intended to get your brain thinking about the right questions to ask me as I walk through the material.
Each exercise has comments in it to help you get through the exercise. These fun emoji characters are here to help you.
Each exercise has an Elaboration and Feedback link. Please fill that out after the exercise and instruction.
At the end of the workshop, please go here to give overall feedback.