Git Product home page Git Product logo

auth0-product-education-labs's Introduction

Auth0 Open Source Software

Auth0 Product Education Labs.

A set of tools and example applications for Product Education courses.

Index

  1. APIs
  2. Tools
  3. Execution Environment
  4. Issue Reporting
  5. Contributing
  6. Author
  7. License

APIs

Expenses API - Secured

The Expenses API is a simple api that is secured using the express-oauth2-bearer module.

Environment Variables

Variable Value Default
ISSUER_BASE_URL https://your-tenant.region.auth0.com
ALLOWED_AUDIENCES https://expenses-api
PORT 5000

Required Scopes

Endpoint Secure Scopes
/
/total
/reports read:reports

Run Local:

ISSUER_BASE_URL=https://your-tenant.region.auth0.com \
npm run expenses-api:secure:start

Vercel Deploy:

https://vercel.com/new/git/external
  ?repository-url=https%3A%2F%2Fgithub.com%2Fauth0%2Fauth0-product-education-labs%2Ftree%2Fmaster%2Fapis%2Fexpenses-api-secured
  &env=
    ISSUER_BASE_URL,
    VERCEL_URL,
    ALLOWED_AUDIENCES
  &project-name=expenses-api
  &repository-name=expenses-api

Deploy with Vercel

Expenses API - Unsecured

The Unsecured Expenses API is a simple api that is intended to be used as a starting point for hands on labs.

Environment Variables

Variable Value Default
ISSUER_BASE_URL https://your-tenant.region.auth0.com
ALLOWED_AUDIENCES https://expenses-api
PORT 5000

Required Scopes

Endpoint Secure Scopes
/
/total
/reports

Run Local:

ISSUER_BASE_URL=https://your-tenant.region.auth0.com \
npm run expenses-api:start

Vercel Deploy:

https://vercel.com/new/git/external
  ?repository-url=https%3A%2F%2Fgithub.com%2Fauth0%2Fauth0-product-education-labs%2Ftree%2Fmaster%2Fapis%2Fexpenses-api-unsecured
  &env=
    ISSUER_BASE_URL,
    VERCEL_URL,
    ALLOWED_AUDIENCES
  &project-name=expenses-api-unsecured
  &repository-name=expenses-api-unsecured

Deploy with Vercel

Tools

Initial Deploy

The initial deploy tool is intended to be used as a test deployment between GitHub and Vercel.

Environment Variables

No environment variables are needed for initial deploy.

Run Local:

npm run initial-deploy:start

Vercel Deploy:

https://vercel.com/new/git/external
  ?repository-url=https%3A%2F%2Fgithub.com%2Fauth0%2Fauth0-product-education-labs%2Ftree%2Fmaster%2Ftools%2Finitial-deploy
  &project-name=initial-deploy
  &repository-name=initial-deploy

Deploy with Vercel

Execution Environment

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 - using a cloud based hosting environment
  • GitHub Codespaces - using a cloud based IDE and runtime
  • VS Code Remote Development - using Docker Desktop to isolate development in a local container. This avoids needing to install developer runtimes on your local machine while allowing to you continue working locally.
  • Local - using your local development environment

Running in 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.

Running in Codespaces

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:

  1. Click the green Code button.
  2. Click the Open with Codespaces menu option.
  3. Click the New codespace button.

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.

Running Locally in Docker

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.

  1. Install Docker Desktop.
  • Right-click on the Docker task bar item and update Settings / Preferences > Shared Drives / File Sharing with any source code locations you want to open in a container.
  1. Install VS Code.
  2. Install the Remote Development Extension Pack.
  3. Open the root directory of the repository in VS Code.
  4. Click Reopen In Container on the remote development notification dialog.

Running Locally

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.

Dependencies

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

Issue Reporting

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.

Contributing

This project follows the all-contributors specification. Contributions of any kind welcome!

Please review our Code of Conduct and Contributing guidelines.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.

auth0-product-education-labs's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.