A set of tools and example applications for Product Education courses
Auth0 Production Education has moved to it’s own organization. These lab materials are no longer maintained and will be archived shortly. Please locate the new docker based labs in the Auth0 Training organization.
A set of tools and example applications for Product Education courses.
Apps
APIs
Tools
The tools and examples in this repository can be run in a number of ways. Each are specific to the task you are trying to accomplish. They are presented here in order or invasiveness to your local machine. For learners, the intention is to use Vercel.
Vercel is a cloud based hosting service. Each individual tool and sample application can be deployed to Vercel by clicking the blue Deploy button. A wizard dialog will guide you through the deployment process.
When prompted for a url in the Vercel deployment wizard, it is important to include a scheme remove any trailing slash.
Example | Valid |
---|---|
http://example.com/api | ✅ |
https://example.com/api | ✅ |
http://example.com/api/ | ❌ |
example.com/api | ❌ |
Each deployment to Vercel is assigned a unique immutable deployment URL. It is then aliased to a production URL that is based on the Vercel project name. If a project already exists on Vercel with a given project name, the production URL will have appended random text to make it unique.
This causes a problem when attempting to configure some settings like baseURL
in the express-openid-connect
node module. For example, you may start on the production url of https://myapp.vercel.app, login using Auth0 and be retured to a completely different url of https://myapp-sdfsdf.vercel.app.
To avoid this situation, these example applications attempt to use another option for the baseURL value that contains both the VERCEL_GITHUB_REPO and VERCEL_GITHUB_ORG environment variables.
Given a VERCEL_GITHUB_REPO value of my-repo
and VERCEL_GITHUB_ORG value of auth0
these URLs are mapped by Vercel.
URL | Meets Expectation |
---|---|
https://my-repo.auth0.vercel.app | ✅ |
https://my-repo-4m8guzwu.vercel.app | ❌ |
https://my-repo.vercel.app | ❌ |
https://front-end-web-app-secured-git-master.notmyself.vercel.app | ❌ |
The overall repository and each individual tool or sample includes a devcontainer definition. GitHub Codespaces can utilize it to create a completely web based IDE and execution environment. No installs are needed.
To use, from the GitHub project page:
The Codespace will be created and the project will load into the web based VS Code IDE.
Note: Once the Codespace is created, you do not need to create it again. Simply select it from the Codespace menu.
The overall repository and each individual tool or sample includes a devcontainer definition. This is to facilitate the use of a self contained docker image containing all the development dependencies.
All of the tools and sample applications can be run locally assuming dependecies are installed on the local machine. To prepare for local execution run npm install
and then npm run init
from the root of the repository.
Project assumes a working nodejs environment and has been tested using the following versions.
Tool | Version | Install |
---|---|---|
Node.js | v12.15.0 | https://nodejs.org/dist/v12.19.0/node-v12.19.0.pkg |
NPM | v6.14.8 | npm install npm@latest -g |
NVM (optional) | v0.36.0 | https://github.com/nvm-sh/nvm |
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
For auth0 related questions/support please use the Support Center.
This project follows the all-contributors specification. Contributions of any kind welcome!
Please review our Code of Conduct and Contributing guidelines.
This project is licensed under the MIT license. See the LICENSE file for more info.