Auth0 Identity Labs

Auth0's digital identity labs are exercises which serve as a learning tool to be combined with our Learn Identity video series. Each lab is meant to be completed once a video (or series of videos) is complete. A few general things to keep in mind as you work through these labs:

Plan to take around 1 hour or so (longer depending on your coding experience) for each lab.

These labs are designed to illustrate the basic concepts of digital identity, OAuth, and OpenID Connect. The goal is to see the parameters and data that come together to create a complete authentication flow. As such, take your time and read through each section carefully. Completing the lab successfully is less important than understanding the concepts within.

The code samples here should not be used as-is in a production app. The code here was written for instructional purpose and simplicity. For guidance on integrating Auth0 with a new or existing app, please see the Quickstarts.

Each lab will have a list of pre-requisites to complete or install. Please take note of specific version numbers as these can have an effect on how the labs work. ℹ️ The error messages displayed in the browser and in the console can often clue you into something that is going wrong. Auth0 error pages typically include a link under the "Technical Details" header that will give you more information about what went wrong. A "SyntaxError" line in your terminal window when starting the server indicates a typo or missed line. ℹ️ The code samples will indicate what lines to add or modify. In most cases, the order of operations (as in, when a particular line of code runs) matters greatly, so pay attention to those lines and the description above each snippet.

// lab-01/begin/server.js
// 👆 That is the file you should be in for these changes.

// 👆 This is code that should not be changed.

// ... other required packages
// 👆 This is information to help you place the new code.

// Add the code below 👇
const session = require('cookie-session');
const { auth } = require('express-openid-connect');
// 👆 This is what should be added

// ...
// 👆This indicates that there is other code after that should not be changed.
Terminal commands are proceeded by a character. If you're copying those commands, exclude that character and the space that follows. Exclude all lines that do not start with ; those are there to show the expected output.

# This line is informational; read but don't use.
❯ this line is the command to copy

This line shows sample output; read but don't use.

Get Started