├── .circleci └── config.yml ├── .editorconfig ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── Bug Report.yml │ ├── Feature Request.yml │ └── config.yml ├── dependabot.yml ├── stale.yml └── workflows │ └── semgrep.yml ├── .gitignore ├── 01-Login ├── .dockerignore ├── .env.example ├── .eslintrc ├── .gitignore ├── Dockerfile ├── README.md ├── app.js ├── bin │ └── www ├── exec.ps1 ├── exec.sh ├── lib │ └── middleware │ │ ├── secured.js │ │ └── userInViews.js ├── package-lock.json ├── package.json ├── public │ └── stylesheets │ │ └── style.css ├── routes │ ├── auth.js │ ├── index.js │ └── users.js └── views │ ├── error.pug │ ├── failure.pug │ ├── index.pug │ ├── layout.pug │ └── user.pug ├── LICENSE └── README.md /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Common logic 2 | defaults: &defaults 3 | steps: 4 | - attach_workspace: 5 | at: ~/ 6 | - run: 7 | name: Replace Auth0 test credentials 8 | command: | 9 | mv $AUTH0_CFG.example $AUTH0_CFG 10 | sed -i 's/{CLIENT_ID}/'$AUTH0_TEST_CLIENT_ID'/g' $AUTH0_CFG 11 | sed -i 's/{DOMAIN}/'$AUTH0_TEST_DOMAIN'/g' $AUTH0_CFG 12 | sed -i 's/{CLIENT_SECRET}/'$AUTH0_TEST_CLIENT_SECRET'/g' $AUTH0_CFG 13 | - run: 14 | name: Build pull request 15 | command: | 16 | docker build -t $CIRCLE_JOB ./$SAMPLE_PATH 17 | docker run -d -p 3000:3000 --name $CIRCLE_SHA1 --env-file ./$AUTH0_CFG $CIRCLE_JOB 18 | background: true 19 | - run: 20 | name: Wait for app to be available 21 | command: | 22 | sleep 20 23 | docker run --network host --rm appropriate/curl --retry 8 --retry-connrefused -v localhost:3000 24 | - run: 25 | name: Run tests 26 | command: | 27 | docker create --network host --name tester codeceptjs/codeceptjs codeceptjs run-multiple --all --steps 28 | docker cp $(pwd)/lock_login_test.js tester:/tests/lock_login_test.js 29 | docker cp $(pwd)/codecept.conf.js tester:/tests/codecept.conf.js 30 | docker start -i tester 31 | working_directory: scripts 32 | - run: 33 | name: Copy app container logs 34 | command: | 35 | mkdir -p /tmp/out 36 | docker logs $CIRCLE_SHA1 > /tmp/out/app_logs.log 37 | docker cp tester:/tests/out /tmp/ 38 | when: on_fail 39 | - store_artifacts: 40 | path: /tmp/out 41 | 42 | # Jobs and Workflows 43 | version: 2 44 | jobs: 45 | checkout: 46 | machine: true 47 | steps: 48 | - checkout 49 | - run: git clone https://github.com/auth0-samples/spa-quickstarts-tests scripts 50 | - persist_to_workspace: 51 | root: ~/ 52 | paths: 53 | - project 54 | - scripts 55 | 01-login: 56 | machine: true 57 | environment: 58 | - AUTH0_CFG: 01-Login/.env 59 | - SAMPLE_PATH: 01-Login 60 | <<: *defaults 61 | 62 | workflows: 63 | version: 2 64 | quickstarts_login: 65 | jobs: 66 | - checkout: 67 | context: Quickstart Web App Test 68 | - 01-login: 69 | context: Quickstart Web App Test 70 | requires: 71 | - checkout 72 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.js] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [{package.json,*.yml,*.cjson}] 14 | indent_style = space 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @auth0-samples/dx-sdks-engineer 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug Report.yml: -------------------------------------------------------------------------------- 1 | name: 🐞 Report a bug 2 | description: Have you found a bug or issue? Create a bug report for this sample 3 | 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | **Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues. 9 | 10 | - type: checkboxes 11 | id: checklist 12 | attributes: 13 | label: Checklist 14 | options: 15 | - label: I have looked into the [Readme](https://github.com/auth0-samples/auth0-nodejs-webapp-sample/tree/master/01-Login#readme) and have not found a suitable solution or answer. 16 | required: true 17 | - label: I have searched the [issues](https://github.com/auth0-samples/auth0-nodejs-webapp-sample/issues) and have not found a suitable solution or answer. 18 | required: true 19 | - label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer. 20 | required: true 21 | - label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). 22 | required: true 23 | 24 | - type: textarea 25 | id: description 26 | attributes: 27 | label: Description 28 | description: Provide a clear and concise description of the issue, including what you expected to happen. 29 | validations: 30 | required: true 31 | 32 | - type: textarea 33 | id: reproduction 34 | attributes: 35 | label: Reproduction 36 | description: Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent. 37 | placeholder: | 38 | 1. Step 1... 39 | 2. Step 2... 40 | 3. ... 41 | validations: 42 | required: true 43 | 44 | - type: textarea 45 | id: additional-context 46 | attributes: 47 | label: Additional context 48 | description: Any other relevant information you think would be useful. 49 | validations: 50 | required: false 51 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature Request.yml: -------------------------------------------------------------------------------- 1 | name: 🧩 Feature request 2 | description: Suggest an idea or a feature for this sample 3 | labels: ["feature request"] 4 | 5 | body: 6 | - type: checkboxes 7 | id: checklist 8 | attributes: 9 | label: Checklist 10 | options: 11 | - label: I have looked into the [Readme](https://github.com/auth0-samples/auth0-nodejs-webapp-sample/tree/master/01-Login#readme) and have not found a suitable solution or answer. 12 | required: true 13 | - label: I have searched the [issues](https://github.com/auth0-samples/auth0-nodejs-webapp-sample/issues) and have not found a suitable solution or answer. 14 | required: true 15 | - label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer. 16 | required: true 17 | - label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). 18 | required: true 19 | 20 | - type: textarea 21 | id: description 22 | attributes: 23 | label: Describe the problem you'd like to have solved 24 | description: A clear and concise description of what the problem is. 25 | validations: 26 | required: true 27 | 28 | - type: textarea 29 | id: ideal-solution 30 | attributes: 31 | label: Describe the ideal solution 32 | description: A clear and concise description of what you want to happen. 33 | validations: 34 | required: true 35 | 36 | - type: textarea 37 | id: alternatives-and-workarounds 38 | attributes: 39 | label: Alternatives and current workarounds 40 | description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place. 41 | validations: 42 | required: false 43 | 44 | - type: textarea 45 | id: additional-context 46 | attributes: 47 | label: Additional context 48 | description: Add any other context or screenshots about the feature request here. 49 | validations: 50 | required: false 51 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: 🤔 Help & Questions 4 | url: https://community.auth0.com 5 | about: Ask general support or usage questions in the Auth0 Community forums. 6 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "npm" 4 | directory: "/01-Login" 5 | schedule: 6 | interval: "daily" 7 | ignore: 8 | - dependency-name: "*" 9 | update-types: ["version-update:semver-major", "version-update:semver-patch"] 10 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 90 5 | 6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. 7 | daysUntilClose: 7 8 | 9 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 10 | exemptLabels: [] 11 | 12 | # Set to true to ignore issues with an assignee (defaults to false) 13 | exemptAssignees: true 14 | 15 | # Label to use when marking as stale 16 | staleLabel: closed:stale 17 | 18 | # Comment to post when marking as stale. Set to `false` to disable 19 | markComment: > 20 | This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️ -------------------------------------------------------------------------------- /.github/workflows/semgrep.yml: -------------------------------------------------------------------------------- 1 | name: Semgrep 2 | 3 | on: 4 | pull_request: {} 5 | 6 | push: 7 | branches: ["master", "main"] 8 | 9 | schedule: 10 | - cron: '30 0 1,15 * *' 11 | 12 | jobs: 13 | semgrep: 14 | name: Scan 15 | runs-on: ubuntu-latest 16 | container: 17 | image: returntocorp/semgrep 18 | # Skip any PR created by dependabot to avoid permission issues 19 | if: (github.actor != 'dependabot[bot]') 20 | steps: 21 | - uses: actions/checkout@v3 22 | 23 | - run: semgrep ci 24 | env: 25 | SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .env -------------------------------------------------------------------------------- /01-Login/.dockerignore: -------------------------------------------------------------------------------- 1 | package-lock.json 2 | node_modules 3 | .gitignore 4 | .env.example 5 | exce.sh 6 | exec.ps1 7 | -------------------------------------------------------------------------------- /01-Login/.env.example: -------------------------------------------------------------------------------- 1 | AUTH0_CLIENT_ID={CLIENT_ID} 2 | AUTH0_DOMAIN={DOMAIN} 3 | AUTH0_CLIENT_SECRET={CLIENT_SECRET} -------------------------------------------------------------------------------- /01-Login/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 8, 4 | "ecmaFeatures": { 5 | "experimentalObjectRestSpread": true, 6 | "jsx": true 7 | }, 8 | "sourceType": "module" 9 | }, 10 | 11 | "env": { 12 | "es6": true, 13 | "node": true, 14 | "mocha": true 15 | }, 16 | 17 | "plugins": [ 18 | "import", 19 | "node", 20 | "promise", 21 | "standard" 22 | ], 23 | 24 | "globals": { 25 | "document": false, 26 | "navigator": false, 27 | "window": false 28 | }, 29 | 30 | "rules": { 31 | "accessor-pairs": "error", 32 | "arrow-spacing": ["error", { "before": true, "after": true }], 33 | "block-spacing": ["error", "always"], 34 | "brace-style": ["error", "1tbs", { "allowSingleLine": true }], 35 | "camelcase": ["error", { "properties": "never" }], 36 | "comma-dangle": ["error", { 37 | "arrays": "never", 38 | "objects": "never", 39 | "imports": "never", 40 | "exports": "never", 41 | "functions": "never" 42 | }], 43 | "comma-spacing": ["error", { "before": false, "after": true }], 44 | "comma-style": ["error", "last"], 45 | "constructor-super": "error", 46 | "curly": ["error", "multi-line"], 47 | "dot-location": ["error", "property"], 48 | "eol-last": "error", 49 | "eqeqeq": ["error", "always", { "null": "ignore" }], 50 | "func-call-spacing": ["error", "never"], 51 | "generator-star-spacing": ["error", { "before": true, "after": true }], 52 | "handle-callback-err": ["error", "^(err|error)$" ], 53 | "indent": ["error", 2, { "SwitchCase": 1 }], 54 | "key-spacing": ["error", { "beforeColon": false, "afterColon": true }], 55 | "keyword-spacing": ["error", { "before": true, "after": true }], 56 | "new-cap": ["error", { "newIsCap": true, "capIsNew": false }], 57 | "new-parens": "error", 58 | "no-array-constructor": "error", 59 | "no-caller": "error", 60 | "no-class-assign": "error", 61 | "no-compare-neg-zero": "error", 62 | "no-cond-assign": "error", 63 | "no-const-assign": "error", 64 | "no-constant-condition": ["error", { "checkLoops": false }], 65 | "no-control-regex": "error", 66 | "no-debugger": "error", 67 | "no-delete-var": "error", 68 | "no-dupe-args": "error", 69 | "no-dupe-class-members": "error", 70 | "no-dupe-keys": "error", 71 | "no-duplicate-case": "error", 72 | "no-empty-character-class": "error", 73 | "no-empty-pattern": "error", 74 | "no-eval": "error", 75 | "no-ex-assign": "error", 76 | "no-extend-native": "error", 77 | "no-extra-bind": "error", 78 | "no-extra-boolean-cast": "error", 79 | "no-extra-parens": ["error", "functions"], 80 | "no-fallthrough": "error", 81 | "no-floating-decimal": "error", 82 | "no-func-assign": "error", 83 | "no-global-assign": "error", 84 | "no-implied-eval": "error", 85 | "no-inner-declarations": ["error", "functions"], 86 | "no-invalid-regexp": "error", 87 | "no-irregular-whitespace": "error", 88 | "no-iterator": "error", 89 | "no-label-var": "error", 90 | "no-labels": ["error", { "allowLoop": false, "allowSwitch": false }], 91 | "no-lone-blocks": "error", 92 | "no-mixed-operators": ["error", { 93 | "groups": [ 94 | ["==", "!=", "===", "!==", ">", ">=", "<", "<="], 95 | ["&&", "||"], 96 | ["in", "instanceof"] 97 | ], 98 | "allowSamePrecedence": true 99 | }], 100 | "no-mixed-spaces-and-tabs": "error", 101 | "no-multi-spaces": "error", 102 | "no-multi-str": "error", 103 | "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }], 104 | "no-negated-in-lhs": "error", 105 | "no-new": "error", 106 | "no-new-func": "error", 107 | "no-new-object": "error", 108 | "no-new-require": "error", 109 | "no-new-symbol": "error", 110 | "no-new-wrappers": "error", 111 | "no-obj-calls": "error", 112 | "no-octal": "error", 113 | "no-octal-escape": "error", 114 | "no-path-concat": "error", 115 | "no-proto": "error", 116 | "no-redeclare": "error", 117 | "no-regex-spaces": "error", 118 | "no-return-assign": ["error", "except-parens"], 119 | "no-return-await": "error", 120 | "no-self-assign": "error", 121 | "no-self-compare": "error", 122 | "no-sequences": "error", 123 | "no-shadow-restricted-names": "error", 124 | "no-sparse-arrays": "error", 125 | "no-tabs": "error", 126 | "no-template-curly-in-string": "error", 127 | "no-this-before-super": "error", 128 | "no-throw-literal": "error", 129 | "no-trailing-spaces": "error", 130 | "no-undef": "error", 131 | "no-undef-init": "error", 132 | "no-unexpected-multiline": "error", 133 | "no-unmodified-loop-condition": "error", 134 | "no-unneeded-ternary": ["error", { "defaultAssignment": false }], 135 | "no-unreachable": "error", 136 | "no-unsafe-finally": "error", 137 | "no-unsafe-negation": "error", 138 | "no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }], 139 | "no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": true }], 140 | "no-use-before-define": ["error", { "functions": false, "classes": false, "variables": false }], 141 | "no-useless-call": "error", 142 | "no-useless-computed-key": "error", 143 | "no-useless-constructor": "error", 144 | "no-useless-escape": "error", 145 | "no-useless-rename": "error", 146 | "no-useless-return": "error", 147 | "no-whitespace-before-property": "error", 148 | "no-with": "error", 149 | "object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }], 150 | "one-var": ["error", { "initialized": "never" }], 151 | "operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" } }], 152 | "padded-blocks": ["error", { "blocks": "never", "switches": "never", "classes": "never" }], 153 | "prefer-promise-reject-errors": "error", 154 | "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }], 155 | "rest-spread-spacing": ["error", "never"], 156 | "semi": ["error", "always"], 157 | "semi-spacing": ["error", { "before": false, "after": true }], 158 | "space-before-blocks": ["error", "always"], 159 | "space-before-function-paren": ["error", "always"], 160 | "space-in-parens": ["error", "never"], 161 | "space-infix-ops": "error", 162 | "space-unary-ops": ["error", { "words": true, "nonwords": false }], 163 | "spaced-comment": ["error", "always", { 164 | "line": { "markers": ["*package", "!", "/", ",", "="] }, 165 | "block": { "balanced": true, "markers": ["*package", "!", ",", ":", "::", "flow-include"], "exceptions": ["*"] } 166 | }], 167 | "symbol-description": "error", 168 | "template-curly-spacing": ["error", "never"], 169 | "template-tag-spacing": ["error", "never"], 170 | "unicode-bom": ["error", "never"], 171 | "use-isnan": "error", 172 | "valid-typeof": ["error", { "requireStringLiterals": true }], 173 | "wrap-iife": ["error", "any", { "functionPrototypeMethods": true }], 174 | "yield-star-spacing": ["error", "both"], 175 | "yoda": ["error", "never"], 176 | 177 | "import/export": "error", 178 | "import/first": "error", 179 | "import/no-duplicates": "error", 180 | "import/no-webpack-loader-syntax": "error", 181 | 182 | "node/no-deprecated-api": "error", 183 | "node/process-exit-as-throw": "error", 184 | 185 | "promise/param-names": "error", 186 | 187 | "standard/array-bracket-even-spacing": ["error", "either"], 188 | "standard/computed-property-even-spacing": ["error", "even"], 189 | "standard/no-callback-literal": "error", 190 | "standard/object-curly-even-spacing": ["error", "either"] 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /01-Login/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .env 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /01-Login/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:20-alpine 2 | 3 | WORKDIR /home/app 4 | 5 | ADD package.json /home/app 6 | RUN npm install 7 | ADD . /home/app 8 | 9 | CMD ["npm", "start"] 10 | 11 | EXPOSE 3000 12 | -------------------------------------------------------------------------------- /01-Login/README.md: -------------------------------------------------------------------------------- 1 | # 01-Login 2 | 3 | ## Running the Sample 4 | 5 | Install the dependencies. 6 | 7 | ```bash 8 | npm install 9 | ``` 10 | 11 | Rename `.env.example` to `.env` and replace the values for `AUTH0_CLIENT_ID`, `AUTH0_DOMAIN`, and `AUTH0_CLIENT_SECRET` with your Auth0 credentials. If you don't yet have an Auth0 account, [sign up](https://auth0.com/signup) for free. 12 | 13 | ```bash 14 | # copy configuration and replace with your own 15 | cp .env.example .env 16 | ``` 17 | 18 | If you're using a hosting provider that uses a proxy in front of Node.js, comment in the `trust proxy` configuration in [app.js](https://github.com/auth0-samples/auth0-nodejs-webapp-sample/blob/812bb41fa655a1178f6a33ba54b0aee2397b1917/01-Login/app.js#L63-L70). This is a [`express-session` configuration setting](https://www.npmjs.com/package/express-session#cookiesecure) that allows for trusting this first proxy. 19 | 20 | Run the app. 21 | 22 | ```bash 23 | npm start 24 | ``` 25 | 26 | The app will be served at `localhost:3000`. 27 | 28 | ## Running the Sample With Docker 29 | 30 | In order to run the example with docker you need to have `docker` installed. 31 | 32 | You also need to set the environment variables as explained [previously](#running-the-sample). 33 | 34 | Execute in command line `sh exec.sh` to run the Docker in Linux, or `.\exec.ps1` to run the Docker in Windows. 35 | 36 | ## What is Auth0? 37 | 38 | Auth0 helps you to: 39 | 40 | * Add authentication with [multiple authentication sources](https://auth0.com/docs/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, among others**, or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider**. 41 | * Add authentication through more traditional **[username/password databases](https://auth0.com/docs/mysql-connection-tutorial)**. 42 | * Add support for **[linking different user accounts](https://auth0.com/docs/link-accounts)** with the same user. 43 | * Support for generating signed [Json Web Tokens](https://auth0.com/docs/jwt) to call your APIs and **flow the user identity** securely. 44 | * Analytics of how, when and where users are logging in. 45 | * Pull data from other sources and add it to the user profile, through [JavaScript rules](https://auth0.com/docs/rules). 46 | 47 | ## Create a free account in Auth0 48 | 49 | 1. Go to [Auth0](https://auth0.com) and click Sign Up. 50 | 2. Use Google, GitHub or Microsoft Account to login. 51 | 52 | ## Issue Reporting 53 | 54 | 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](https://auth0.com/whitehat) details the procedure for disclosing security issues. 55 | 56 | ## Author 57 | 58 | [Auth0](https://auth0.com) 59 | 60 | ## License 61 | 62 | This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. 63 | -------------------------------------------------------------------------------- /01-Login/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var logger = require('morgan'); 4 | var cookieParser = require('cookie-parser'); 5 | var session = require('express-session'); 6 | var dotenv = require('dotenv'); 7 | var passport = require('passport'); 8 | var Auth0Strategy = require('passport-auth0'); 9 | var flash = require('connect-flash'); 10 | var userInViews = require('./lib/middleware/userInViews'); 11 | var authRouter = require('./routes/auth'); 12 | var indexRouter = require('./routes/index'); 13 | var usersRouter = require('./routes/users'); 14 | 15 | dotenv.config(); 16 | 17 | // Configure Passport to use Auth0 18 | var strategy = new Auth0Strategy( 19 | { 20 | domain: process.env.AUTH0_DOMAIN, 21 | clientID: process.env.AUTH0_CLIENT_ID, 22 | clientSecret: process.env.AUTH0_CLIENT_SECRET, 23 | callbackURL: 24 | process.env.AUTH0_CALLBACK_URL || 'http://localhost:3000/callback' 25 | }, 26 | function (accessToken, refreshToken, extraParams, profile, done) { 27 | // accessToken is the token to call Auth0 API (not needed in the most cases) 28 | // extraParams.id_token has the JSON Web Token 29 | // profile has all the information from the user 30 | return done(null, profile); 31 | } 32 | ); 33 | 34 | passport.use(strategy); 35 | 36 | // You can use this section to keep a smaller payload 37 | passport.serializeUser(function (user, done) { 38 | done(null, user); 39 | }); 40 | 41 | passport.deserializeUser(function (user, done) { 42 | done(null, user); 43 | }); 44 | 45 | const app = express(); 46 | 47 | // View engine setup 48 | app.set('views', path.join(__dirname, 'views')); 49 | app.set('view engine', 'pug'); 50 | 51 | app.use(logger('dev')); 52 | app.use(cookieParser()); 53 | 54 | // config express-session 55 | var sess = { 56 | secret: 'CHANGE THIS SECRET', 57 | cookie: {}, 58 | resave: false, 59 | saveUninitialized: true 60 | }; 61 | 62 | if (app.get('env') === 'production') { 63 | // If you are using a hosting provider which uses a proxy (eg. Heroku), 64 | // comment in the following app.set configuration command 65 | // 66 | // Trust first proxy, to prevent "Unable to verify authorization request state." 67 | // errors with passport-auth0. 68 | // Ref: https://github.com/auth0/passport-auth0/issues/70#issuecomment-480771614 69 | // Ref: https://www.npmjs.com/package/express-session#cookiesecure 70 | // app.set('trust proxy', 1); 71 | 72 | sess.cookie.secure = true; // serve secure cookies, requires https 73 | } 74 | 75 | app.use(session(sess)); 76 | 77 | app.use(passport.initialize()); 78 | app.use(passport.session()); 79 | app.use(express.static(path.join(__dirname, 'public'))); 80 | 81 | app.use(flash()); 82 | 83 | // Handle auth failure error messages 84 | app.use(function (req, res, next) { 85 | if (req && req.query && req.query.error) { 86 | req.flash('error', req.query.error); 87 | } 88 | if (req && req.query && req.query.error_description) { 89 | req.flash('error_description', req.query.error_description); 90 | } 91 | next(); 92 | }); 93 | 94 | app.use(userInViews()); 95 | app.use('/', authRouter); 96 | app.use('/', indexRouter); 97 | app.use('/', usersRouter); 98 | 99 | // Catch 404 and forward to error handler 100 | app.use(function (req, res, next) { 101 | const err = new Error('Not Found'); 102 | err.status = 404; 103 | next(err); 104 | }); 105 | 106 | // Error handlers 107 | 108 | // Development error handler 109 | // Will print stacktrace 110 | if (app.get('env') === 'development') { 111 | app.use(function (err, req, res, next) { 112 | res.status(err.status || 500); 113 | res.render('error', { 114 | message: err.message, 115 | error: err 116 | }); 117 | }); 118 | } 119 | 120 | // Production error handler 121 | // No stacktraces leaked to user 122 | app.use(function (err, req, res, next) { 123 | res.status(err.status || 500); 124 | res.render('error', { 125 | message: err.message, 126 | error: {} 127 | }); 128 | }); 129 | 130 | module.exports = app; 131 | -------------------------------------------------------------------------------- /01-Login/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('nodejs-regular-webapp2:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | console.log('Listening on ' + bind); 91 | } 92 | -------------------------------------------------------------------------------- /01-Login/exec.ps1: -------------------------------------------------------------------------------- 1 | docker build -t auth0-nodejs-webapp-01-login . 2 | docker run --env-file .env -p 3000:3000 -it auth0-nodejs-webapp-01-login 3 | -------------------------------------------------------------------------------- /01-Login/exec.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker build -t auth0-nodejs-webapp-01-login . 3 | docker run --env-file .env -p 3000:3000 -it auth0-nodejs-webapp-01-login 4 | -------------------------------------------------------------------------------- /01-Login/lib/middleware/secured.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This is an example middleware that checks if the user is logged in. 3 | * 4 | * If the user is not logged in, it stores the requested url in `returnTo` attribute 5 | * and then redirects to `/login`. 6 | * 7 | */ 8 | module.exports = function () { 9 | return function secured (req, res, next) { 10 | if (req.user) { return next(); } 11 | req.session.returnTo = req.originalUrl; 12 | res.redirect('/login'); 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /01-Login/lib/middleware/userInViews.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The purpose of this middleware is to have the `user` 3 | * object available for all views. 4 | * 5 | * This is important because the user is used in layout.pug. 6 | */ 7 | module.exports = function () { 8 | return function (req, res, next) { 9 | res.locals.user = req.user; 10 | next(); 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /01-Login/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "auth0-nodejs-webapp-sample-new-test", 3 | "version": "0.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "auth0-nodejs-webapp-sample-new-test", 9 | "version": "0.0.0", 10 | "dependencies": { 11 | "connect-flash": "^0.1.1", 12 | "cookie-parser": "^1.4.6", 13 | "debug": "~4.3.4", 14 | "dotenv": "^16.3.0", 15 | "express": "~4.18.2", 16 | "express-session": "^1.17.3", 17 | "http-errors": "~2.0.0", 18 | "morgan": "~1.10.0", 19 | "passport": "^0.7.0", 20 | "passport-auth0": "^1.4.4", 21 | "pug": "^3.0.2" 22 | } 23 | }, 24 | "node_modules/@babel/helper-string-parser": { 25 | "version": "7.23.4", 26 | "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", 27 | "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", 28 | "engines": { 29 | "node": ">=6.9.0" 30 | } 31 | }, 32 | "node_modules/@babel/helper-validator-identifier": { 33 | "version": "7.22.20", 34 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", 35 | "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", 36 | "engines": { 37 | "node": ">=6.9.0" 38 | } 39 | }, 40 | "node_modules/@babel/parser": { 41 | "version": "7.23.6", 42 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", 43 | "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", 44 | "bin": { 45 | "parser": "bin/babel-parser.js" 46 | }, 47 | "engines": { 48 | "node": ">=6.0.0" 49 | } 50 | }, 51 | "node_modules/@babel/types": { 52 | "version": "7.23.6", 53 | "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", 54 | "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", 55 | "dependencies": { 56 | "@babel/helper-string-parser": "^7.23.4", 57 | "@babel/helper-validator-identifier": "^7.22.20", 58 | "to-fast-properties": "^2.0.0" 59 | }, 60 | "engines": { 61 | "node": ">=6.9.0" 62 | } 63 | }, 64 | "node_modules/accepts": { 65 | "version": "1.3.8", 66 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 67 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 68 | "dependencies": { 69 | "mime-types": "~2.1.34", 70 | "negotiator": "0.6.3" 71 | }, 72 | "engines": { 73 | "node": ">= 0.6" 74 | } 75 | }, 76 | "node_modules/acorn": { 77 | "version": "7.4.1", 78 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 79 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", 80 | "bin": { 81 | "acorn": "bin/acorn" 82 | }, 83 | "engines": { 84 | "node": ">=0.4.0" 85 | } 86 | }, 87 | "node_modules/array-flatten": { 88 | "version": "1.1.1", 89 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 90 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 91 | }, 92 | "node_modules/asap": { 93 | "version": "2.0.6", 94 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", 95 | "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" 96 | }, 97 | "node_modules/assert-never": { 98 | "version": "1.2.1", 99 | "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.2.1.tgz", 100 | "integrity": "sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==" 101 | }, 102 | "node_modules/asynckit": { 103 | "version": "0.4.0", 104 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 105 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 106 | }, 107 | "node_modules/axios": { 108 | "version": "1.6.5", 109 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", 110 | "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", 111 | "dependencies": { 112 | "follow-redirects": "^1.15.4", 113 | "form-data": "^4.0.0", 114 | "proxy-from-env": "^1.1.0" 115 | } 116 | }, 117 | "node_modules/babel-walk": { 118 | "version": "3.0.0-canary-5", 119 | "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", 120 | "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==", 121 | "dependencies": { 122 | "@babel/types": "^7.9.6" 123 | }, 124 | "engines": { 125 | "node": ">= 10.0.0" 126 | } 127 | }, 128 | "node_modules/base64url": { 129 | "version": "3.0.1", 130 | "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", 131 | "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", 132 | "engines": { 133 | "node": ">=6.0.0" 134 | } 135 | }, 136 | "node_modules/basic-auth": { 137 | "version": "2.0.1", 138 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", 139 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", 140 | "dependencies": { 141 | "safe-buffer": "5.1.2" 142 | }, 143 | "engines": { 144 | "node": ">= 0.8" 145 | } 146 | }, 147 | "node_modules/basic-auth/node_modules/safe-buffer": { 148 | "version": "5.1.2", 149 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 150 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 151 | }, 152 | "node_modules/body-parser": { 153 | "version": "1.20.1", 154 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 155 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 156 | "dependencies": { 157 | "bytes": "3.1.2", 158 | "content-type": "~1.0.4", 159 | "debug": "2.6.9", 160 | "depd": "2.0.0", 161 | "destroy": "1.2.0", 162 | "http-errors": "2.0.0", 163 | "iconv-lite": "0.4.24", 164 | "on-finished": "2.4.1", 165 | "qs": "6.11.0", 166 | "raw-body": "2.5.1", 167 | "type-is": "~1.6.18", 168 | "unpipe": "1.0.0" 169 | }, 170 | "engines": { 171 | "node": ">= 0.8", 172 | "npm": "1.2.8000 || >= 1.4.16" 173 | } 174 | }, 175 | "node_modules/body-parser/node_modules/debug": { 176 | "version": "2.6.9", 177 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 178 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 179 | "dependencies": { 180 | "ms": "2.0.0" 181 | } 182 | }, 183 | "node_modules/body-parser/node_modules/ms": { 184 | "version": "2.0.0", 185 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 186 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 187 | }, 188 | "node_modules/bytes": { 189 | "version": "3.1.2", 190 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 191 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 192 | "engines": { 193 | "node": ">= 0.8" 194 | } 195 | }, 196 | "node_modules/call-bind": { 197 | "version": "1.0.5", 198 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", 199 | "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", 200 | "dependencies": { 201 | "function-bind": "^1.1.2", 202 | "get-intrinsic": "^1.2.1", 203 | "set-function-length": "^1.1.1" 204 | }, 205 | "funding": { 206 | "url": "https://github.com/sponsors/ljharb" 207 | } 208 | }, 209 | "node_modules/character-parser": { 210 | "version": "2.2.0", 211 | "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", 212 | "integrity": "sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==", 213 | "dependencies": { 214 | "is-regex": "^1.0.3" 215 | } 216 | }, 217 | "node_modules/combined-stream": { 218 | "version": "1.0.8", 219 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 220 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 221 | "dependencies": { 222 | "delayed-stream": "~1.0.0" 223 | }, 224 | "engines": { 225 | "node": ">= 0.8" 226 | } 227 | }, 228 | "node_modules/connect-flash": { 229 | "version": "0.1.1", 230 | "resolved": "https://registry.npmjs.org/connect-flash/-/connect-flash-0.1.1.tgz", 231 | "integrity": "sha512-2rcfELQt/ZMP+SM/pG8PyhJRaLKp+6Hk2IUBNkEit09X+vwn3QsAL3ZbYtxUn7NVPzbMTSLRDhqe0B/eh30RYA==", 232 | "engines": { 233 | "node": ">= 0.4.0" 234 | } 235 | }, 236 | "node_modules/constantinople": { 237 | "version": "4.0.1", 238 | "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", 239 | "integrity": "sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==", 240 | "dependencies": { 241 | "@babel/parser": "^7.6.0", 242 | "@babel/types": "^7.6.1" 243 | } 244 | }, 245 | "node_modules/content-disposition": { 246 | "version": "0.5.4", 247 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 248 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 249 | "dependencies": { 250 | "safe-buffer": "5.2.1" 251 | }, 252 | "engines": { 253 | "node": ">= 0.6" 254 | } 255 | }, 256 | "node_modules/content-type": { 257 | "version": "1.0.5", 258 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 259 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 260 | "engines": { 261 | "node": ">= 0.6" 262 | } 263 | }, 264 | "node_modules/cookie": { 265 | "version": "0.4.1", 266 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", 267 | "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", 268 | "engines": { 269 | "node": ">= 0.6" 270 | } 271 | }, 272 | "node_modules/cookie-parser": { 273 | "version": "1.4.6", 274 | "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", 275 | "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", 276 | "dependencies": { 277 | "cookie": "0.4.1", 278 | "cookie-signature": "1.0.6" 279 | }, 280 | "engines": { 281 | "node": ">= 0.8.0" 282 | } 283 | }, 284 | "node_modules/cookie-signature": { 285 | "version": "1.0.6", 286 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 287 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 288 | }, 289 | "node_modules/debug": { 290 | "version": "4.3.4", 291 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 292 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 293 | "dependencies": { 294 | "ms": "2.1.2" 295 | }, 296 | "engines": { 297 | "node": ">=6.0" 298 | }, 299 | "peerDependenciesMeta": { 300 | "supports-color": { 301 | "optional": true 302 | } 303 | } 304 | }, 305 | "node_modules/define-data-property": { 306 | "version": "1.1.1", 307 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", 308 | "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", 309 | "dependencies": { 310 | "get-intrinsic": "^1.2.1", 311 | "gopd": "^1.0.1", 312 | "has-property-descriptors": "^1.0.0" 313 | }, 314 | "engines": { 315 | "node": ">= 0.4" 316 | } 317 | }, 318 | "node_modules/delayed-stream": { 319 | "version": "1.0.0", 320 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 321 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 322 | "engines": { 323 | "node": ">=0.4.0" 324 | } 325 | }, 326 | "node_modules/depd": { 327 | "version": "2.0.0", 328 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 329 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 330 | "engines": { 331 | "node": ">= 0.8" 332 | } 333 | }, 334 | "node_modules/destroy": { 335 | "version": "1.2.0", 336 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 337 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 338 | "engines": { 339 | "node": ">= 0.8", 340 | "npm": "1.2.8000 || >= 1.4.16" 341 | } 342 | }, 343 | "node_modules/doctypes": { 344 | "version": "1.1.0", 345 | "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", 346 | "integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==" 347 | }, 348 | "node_modules/dotenv": { 349 | "version": "16.3.1", 350 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 351 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 352 | "engines": { 353 | "node": ">=12" 354 | }, 355 | "funding": { 356 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 357 | } 358 | }, 359 | "node_modules/ee-first": { 360 | "version": "1.1.1", 361 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 362 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 363 | }, 364 | "node_modules/encodeurl": { 365 | "version": "1.0.2", 366 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 367 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 368 | "engines": { 369 | "node": ">= 0.8" 370 | } 371 | }, 372 | "node_modules/escape-html": { 373 | "version": "1.0.3", 374 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 375 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 376 | }, 377 | "node_modules/etag": { 378 | "version": "1.8.1", 379 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 380 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 381 | "engines": { 382 | "node": ">= 0.6" 383 | } 384 | }, 385 | "node_modules/express": { 386 | "version": "4.18.2", 387 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 388 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 389 | "dependencies": { 390 | "accepts": "~1.3.8", 391 | "array-flatten": "1.1.1", 392 | "body-parser": "1.20.1", 393 | "content-disposition": "0.5.4", 394 | "content-type": "~1.0.4", 395 | "cookie": "0.5.0", 396 | "cookie-signature": "1.0.6", 397 | "debug": "2.6.9", 398 | "depd": "2.0.0", 399 | "encodeurl": "~1.0.2", 400 | "escape-html": "~1.0.3", 401 | "etag": "~1.8.1", 402 | "finalhandler": "1.2.0", 403 | "fresh": "0.5.2", 404 | "http-errors": "2.0.0", 405 | "merge-descriptors": "1.0.1", 406 | "methods": "~1.1.2", 407 | "on-finished": "2.4.1", 408 | "parseurl": "~1.3.3", 409 | "path-to-regexp": "0.1.7", 410 | "proxy-addr": "~2.0.7", 411 | "qs": "6.11.0", 412 | "range-parser": "~1.2.1", 413 | "safe-buffer": "5.2.1", 414 | "send": "0.18.0", 415 | "serve-static": "1.15.0", 416 | "setprototypeof": "1.2.0", 417 | "statuses": "2.0.1", 418 | "type-is": "~1.6.18", 419 | "utils-merge": "1.0.1", 420 | "vary": "~1.1.2" 421 | }, 422 | "engines": { 423 | "node": ">= 0.10.0" 424 | } 425 | }, 426 | "node_modules/express-session": { 427 | "version": "1.17.3", 428 | "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.3.tgz", 429 | "integrity": "sha512-4+otWXlShYlG1Ma+2Jnn+xgKUZTMJ5QD3YvfilX3AcocOAbIkVylSWEklzALe/+Pu4qV6TYBj5GwOBFfdKqLBw==", 430 | "dependencies": { 431 | "cookie": "0.4.2", 432 | "cookie-signature": "1.0.6", 433 | "debug": "2.6.9", 434 | "depd": "~2.0.0", 435 | "on-headers": "~1.0.2", 436 | "parseurl": "~1.3.3", 437 | "safe-buffer": "5.2.1", 438 | "uid-safe": "~2.1.5" 439 | }, 440 | "engines": { 441 | "node": ">= 0.8.0" 442 | } 443 | }, 444 | "node_modules/express-session/node_modules/cookie": { 445 | "version": "0.4.2", 446 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", 447 | "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", 448 | "engines": { 449 | "node": ">= 0.6" 450 | } 451 | }, 452 | "node_modules/express-session/node_modules/debug": { 453 | "version": "2.6.9", 454 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 455 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 456 | "dependencies": { 457 | "ms": "2.0.0" 458 | } 459 | }, 460 | "node_modules/express-session/node_modules/ms": { 461 | "version": "2.0.0", 462 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 463 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 464 | }, 465 | "node_modules/express/node_modules/cookie": { 466 | "version": "0.5.0", 467 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 468 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 469 | "engines": { 470 | "node": ">= 0.6" 471 | } 472 | }, 473 | "node_modules/express/node_modules/debug": { 474 | "version": "2.6.9", 475 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 476 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 477 | "dependencies": { 478 | "ms": "2.0.0" 479 | } 480 | }, 481 | "node_modules/express/node_modules/ms": { 482 | "version": "2.0.0", 483 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 484 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 485 | }, 486 | "node_modules/finalhandler": { 487 | "version": "1.2.0", 488 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 489 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 490 | "dependencies": { 491 | "debug": "2.6.9", 492 | "encodeurl": "~1.0.2", 493 | "escape-html": "~1.0.3", 494 | "on-finished": "2.4.1", 495 | "parseurl": "~1.3.3", 496 | "statuses": "2.0.1", 497 | "unpipe": "~1.0.0" 498 | }, 499 | "engines": { 500 | "node": ">= 0.8" 501 | } 502 | }, 503 | "node_modules/finalhandler/node_modules/debug": { 504 | "version": "2.6.9", 505 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 506 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 507 | "dependencies": { 508 | "ms": "2.0.0" 509 | } 510 | }, 511 | "node_modules/finalhandler/node_modules/ms": { 512 | "version": "2.0.0", 513 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 514 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 515 | }, 516 | "node_modules/follow-redirects": { 517 | "version": "1.15.5", 518 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", 519 | "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", 520 | "funding": [ 521 | { 522 | "type": "individual", 523 | "url": "https://github.com/sponsors/RubenVerborgh" 524 | } 525 | ], 526 | "engines": { 527 | "node": ">=4.0" 528 | }, 529 | "peerDependenciesMeta": { 530 | "debug": { 531 | "optional": true 532 | } 533 | } 534 | }, 535 | "node_modules/form-data": { 536 | "version": "4.0.0", 537 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 538 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 539 | "dependencies": { 540 | "asynckit": "^0.4.0", 541 | "combined-stream": "^1.0.8", 542 | "mime-types": "^2.1.12" 543 | }, 544 | "engines": { 545 | "node": ">= 6" 546 | } 547 | }, 548 | "node_modules/forwarded": { 549 | "version": "0.2.0", 550 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 551 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 552 | "engines": { 553 | "node": ">= 0.6" 554 | } 555 | }, 556 | "node_modules/fresh": { 557 | "version": "0.5.2", 558 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 559 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 560 | "engines": { 561 | "node": ">= 0.6" 562 | } 563 | }, 564 | "node_modules/function-bind": { 565 | "version": "1.1.2", 566 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 567 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 568 | "funding": { 569 | "url": "https://github.com/sponsors/ljharb" 570 | } 571 | }, 572 | "node_modules/get-intrinsic": { 573 | "version": "1.2.2", 574 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", 575 | "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", 576 | "dependencies": { 577 | "function-bind": "^1.1.2", 578 | "has-proto": "^1.0.1", 579 | "has-symbols": "^1.0.3", 580 | "hasown": "^2.0.0" 581 | }, 582 | "funding": { 583 | "url": "https://github.com/sponsors/ljharb" 584 | } 585 | }, 586 | "node_modules/gopd": { 587 | "version": "1.0.1", 588 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 589 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 590 | "dependencies": { 591 | "get-intrinsic": "^1.1.3" 592 | }, 593 | "funding": { 594 | "url": "https://github.com/sponsors/ljharb" 595 | } 596 | }, 597 | "node_modules/has-property-descriptors": { 598 | "version": "1.0.1", 599 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", 600 | "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", 601 | "dependencies": { 602 | "get-intrinsic": "^1.2.2" 603 | }, 604 | "funding": { 605 | "url": "https://github.com/sponsors/ljharb" 606 | } 607 | }, 608 | "node_modules/has-proto": { 609 | "version": "1.0.1", 610 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 611 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 612 | "engines": { 613 | "node": ">= 0.4" 614 | }, 615 | "funding": { 616 | "url": "https://github.com/sponsors/ljharb" 617 | } 618 | }, 619 | "node_modules/has-symbols": { 620 | "version": "1.0.3", 621 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 622 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 623 | "engines": { 624 | "node": ">= 0.4" 625 | }, 626 | "funding": { 627 | "url": "https://github.com/sponsors/ljharb" 628 | } 629 | }, 630 | "node_modules/has-tostringtag": { 631 | "version": "1.0.0", 632 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", 633 | "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", 634 | "dependencies": { 635 | "has-symbols": "^1.0.2" 636 | }, 637 | "engines": { 638 | "node": ">= 0.4" 639 | }, 640 | "funding": { 641 | "url": "https://github.com/sponsors/ljharb" 642 | } 643 | }, 644 | "node_modules/hasown": { 645 | "version": "2.0.0", 646 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", 647 | "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", 648 | "dependencies": { 649 | "function-bind": "^1.1.2" 650 | }, 651 | "engines": { 652 | "node": ">= 0.4" 653 | } 654 | }, 655 | "node_modules/http-errors": { 656 | "version": "2.0.0", 657 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 658 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 659 | "dependencies": { 660 | "depd": "2.0.0", 661 | "inherits": "2.0.4", 662 | "setprototypeof": "1.2.0", 663 | "statuses": "2.0.1", 664 | "toidentifier": "1.0.1" 665 | }, 666 | "engines": { 667 | "node": ">= 0.8" 668 | } 669 | }, 670 | "node_modules/iconv-lite": { 671 | "version": "0.4.24", 672 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 673 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 674 | "dependencies": { 675 | "safer-buffer": ">= 2.1.2 < 3" 676 | }, 677 | "engines": { 678 | "node": ">=0.10.0" 679 | } 680 | }, 681 | "node_modules/inherits": { 682 | "version": "2.0.4", 683 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 684 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 685 | }, 686 | "node_modules/ipaddr.js": { 687 | "version": "1.9.1", 688 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 689 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 690 | "engines": { 691 | "node": ">= 0.10" 692 | } 693 | }, 694 | "node_modules/is-core-module": { 695 | "version": "2.13.1", 696 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", 697 | "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", 698 | "dependencies": { 699 | "hasown": "^2.0.0" 700 | }, 701 | "funding": { 702 | "url": "https://github.com/sponsors/ljharb" 703 | } 704 | }, 705 | "node_modules/is-expression": { 706 | "version": "4.0.0", 707 | "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-4.0.0.tgz", 708 | "integrity": "sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==", 709 | "dependencies": { 710 | "acorn": "^7.1.1", 711 | "object-assign": "^4.1.1" 712 | } 713 | }, 714 | "node_modules/is-promise": { 715 | "version": "2.2.2", 716 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", 717 | "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" 718 | }, 719 | "node_modules/is-regex": { 720 | "version": "1.1.4", 721 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", 722 | "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", 723 | "dependencies": { 724 | "call-bind": "^1.0.2", 725 | "has-tostringtag": "^1.0.0" 726 | }, 727 | "engines": { 728 | "node": ">= 0.4" 729 | }, 730 | "funding": { 731 | "url": "https://github.com/sponsors/ljharb" 732 | } 733 | }, 734 | "node_modules/js-stringify": { 735 | "version": "1.0.2", 736 | "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", 737 | "integrity": "sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==" 738 | }, 739 | "node_modules/jstransformer": { 740 | "version": "1.0.0", 741 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", 742 | "integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==", 743 | "dependencies": { 744 | "is-promise": "^2.0.0", 745 | "promise": "^7.0.1" 746 | } 747 | }, 748 | "node_modules/media-typer": { 749 | "version": "0.3.0", 750 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 751 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 752 | "engines": { 753 | "node": ">= 0.6" 754 | } 755 | }, 756 | "node_modules/merge-descriptors": { 757 | "version": "1.0.1", 758 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 759 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 760 | }, 761 | "node_modules/methods": { 762 | "version": "1.1.2", 763 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 764 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 765 | "engines": { 766 | "node": ">= 0.6" 767 | } 768 | }, 769 | "node_modules/mime": { 770 | "version": "1.6.0", 771 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 772 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 773 | "bin": { 774 | "mime": "cli.js" 775 | }, 776 | "engines": { 777 | "node": ">=4" 778 | } 779 | }, 780 | "node_modules/mime-db": { 781 | "version": "1.52.0", 782 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 783 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 784 | "engines": { 785 | "node": ">= 0.6" 786 | } 787 | }, 788 | "node_modules/mime-types": { 789 | "version": "2.1.35", 790 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 791 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 792 | "dependencies": { 793 | "mime-db": "1.52.0" 794 | }, 795 | "engines": { 796 | "node": ">= 0.6" 797 | } 798 | }, 799 | "node_modules/morgan": { 800 | "version": "1.10.0", 801 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", 802 | "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", 803 | "dependencies": { 804 | "basic-auth": "~2.0.1", 805 | "debug": "2.6.9", 806 | "depd": "~2.0.0", 807 | "on-finished": "~2.3.0", 808 | "on-headers": "~1.0.2" 809 | }, 810 | "engines": { 811 | "node": ">= 0.8.0" 812 | } 813 | }, 814 | "node_modules/morgan/node_modules/debug": { 815 | "version": "2.6.9", 816 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 817 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 818 | "dependencies": { 819 | "ms": "2.0.0" 820 | } 821 | }, 822 | "node_modules/morgan/node_modules/ms": { 823 | "version": "2.0.0", 824 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 825 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 826 | }, 827 | "node_modules/morgan/node_modules/on-finished": { 828 | "version": "2.3.0", 829 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 830 | "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", 831 | "dependencies": { 832 | "ee-first": "1.1.1" 833 | }, 834 | "engines": { 835 | "node": ">= 0.8" 836 | } 837 | }, 838 | "node_modules/ms": { 839 | "version": "2.1.2", 840 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 841 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 842 | }, 843 | "node_modules/negotiator": { 844 | "version": "0.6.3", 845 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 846 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 847 | "engines": { 848 | "node": ">= 0.6" 849 | } 850 | }, 851 | "node_modules/oauth": { 852 | "version": "0.9.15", 853 | "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", 854 | "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==" 855 | }, 856 | "node_modules/object-assign": { 857 | "version": "4.1.1", 858 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 859 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 860 | "engines": { 861 | "node": ">=0.10.0" 862 | } 863 | }, 864 | "node_modules/object-inspect": { 865 | "version": "1.13.1", 866 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", 867 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", 868 | "funding": { 869 | "url": "https://github.com/sponsors/ljharb" 870 | } 871 | }, 872 | "node_modules/on-finished": { 873 | "version": "2.4.1", 874 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 875 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 876 | "dependencies": { 877 | "ee-first": "1.1.1" 878 | }, 879 | "engines": { 880 | "node": ">= 0.8" 881 | } 882 | }, 883 | "node_modules/on-headers": { 884 | "version": "1.0.2", 885 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", 886 | "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", 887 | "engines": { 888 | "node": ">= 0.8" 889 | } 890 | }, 891 | "node_modules/parseurl": { 892 | "version": "1.3.3", 893 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 894 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 895 | "engines": { 896 | "node": ">= 0.8" 897 | } 898 | }, 899 | "node_modules/passport": { 900 | "version": "0.7.0", 901 | "resolved": "https://registry.npmjs.org/passport/-/passport-0.7.0.tgz", 902 | "integrity": "sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==", 903 | "dependencies": { 904 | "passport-strategy": "1.x.x", 905 | "pause": "0.0.1", 906 | "utils-merge": "^1.0.1" 907 | }, 908 | "engines": { 909 | "node": ">= 0.4.0" 910 | }, 911 | "funding": { 912 | "type": "github", 913 | "url": "https://github.com/sponsors/jaredhanson" 914 | } 915 | }, 916 | "node_modules/passport-auth0": { 917 | "version": "1.4.4", 918 | "resolved": "https://registry.npmjs.org/passport-auth0/-/passport-auth0-1.4.4.tgz", 919 | "integrity": "sha512-PFkjMfsfXSwgn94QCrZl2hObRHiqrAJffyeUvI8e8HqTG7MfOlyzWO3wSL5dlH+MUGR5+DQr+vtXFFu6Sx8cfg==", 920 | "dependencies": { 921 | "axios": "^1.6.0", 922 | "passport-oauth": "^1.0.0", 923 | "passport-oauth2": "^1.6.0" 924 | } 925 | }, 926 | "node_modules/passport-oauth": { 927 | "version": "1.0.0", 928 | "resolved": "https://registry.npmjs.org/passport-oauth/-/passport-oauth-1.0.0.tgz", 929 | "integrity": "sha512-4IZNVsZbN1dkBzmEbBqUxDG8oFOIK81jqdksE3HEb/vI3ib3FMjbiZZ6MTtooyYZzmKu0BfovjvT1pdGgIq+4Q==", 930 | "dependencies": { 931 | "passport-oauth1": "1.x.x", 932 | "passport-oauth2": "1.x.x" 933 | }, 934 | "engines": { 935 | "node": ">= 0.4.0" 936 | } 937 | }, 938 | "node_modules/passport-oauth1": { 939 | "version": "1.3.0", 940 | "resolved": "https://registry.npmjs.org/passport-oauth1/-/passport-oauth1-1.3.0.tgz", 941 | "integrity": "sha512-8T/nX4gwKTw0PjxP1xfD0QhrydQNakzeOpZ6M5Uqdgz9/a/Ag62RmJxnZQ4LkbdXGrRehQHIAHNAu11rCP46Sw==", 942 | "dependencies": { 943 | "oauth": "0.9.x", 944 | "passport-strategy": "1.x.x", 945 | "utils-merge": "1.x.x" 946 | }, 947 | "engines": { 948 | "node": ">= 0.4.0" 949 | }, 950 | "funding": { 951 | "type": "github", 952 | "url": "https://github.com/sponsors/jaredhanson" 953 | } 954 | }, 955 | "node_modules/passport-oauth2": { 956 | "version": "1.7.0", 957 | "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.7.0.tgz", 958 | "integrity": "sha512-j2gf34szdTF2Onw3+76alNnaAExlUmHvkc7cL+cmaS5NzHzDP/BvFHJruueQ9XAeNOdpI+CH+PWid8RA7KCwAQ==", 959 | "dependencies": { 960 | "base64url": "3.x.x", 961 | "oauth": "0.9.x", 962 | "passport-strategy": "1.x.x", 963 | "uid2": "0.0.x", 964 | "utils-merge": "1.x.x" 965 | }, 966 | "engines": { 967 | "node": ">= 0.4.0" 968 | }, 969 | "funding": { 970 | "type": "github", 971 | "url": "https://github.com/sponsors/jaredhanson" 972 | } 973 | }, 974 | "node_modules/passport-strategy": { 975 | "version": "1.0.0", 976 | "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", 977 | "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", 978 | "engines": { 979 | "node": ">= 0.4.0" 980 | } 981 | }, 982 | "node_modules/path-parse": { 983 | "version": "1.0.7", 984 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 985 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" 986 | }, 987 | "node_modules/path-to-regexp": { 988 | "version": "0.1.7", 989 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 990 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 991 | }, 992 | "node_modules/pause": { 993 | "version": "0.0.1", 994 | "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", 995 | "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" 996 | }, 997 | "node_modules/promise": { 998 | "version": "7.3.1", 999 | "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", 1000 | "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", 1001 | "dependencies": { 1002 | "asap": "~2.0.3" 1003 | } 1004 | }, 1005 | "node_modules/proxy-addr": { 1006 | "version": "2.0.7", 1007 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 1008 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 1009 | "dependencies": { 1010 | "forwarded": "0.2.0", 1011 | "ipaddr.js": "1.9.1" 1012 | }, 1013 | "engines": { 1014 | "node": ">= 0.10" 1015 | } 1016 | }, 1017 | "node_modules/proxy-from-env": { 1018 | "version": "1.1.0", 1019 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 1020 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" 1021 | }, 1022 | "node_modules/pug": { 1023 | "version": "3.0.2", 1024 | "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.2.tgz", 1025 | "integrity": "sha512-bp0I/hiK1D1vChHh6EfDxtndHji55XP/ZJKwsRqrz6lRia6ZC2OZbdAymlxdVFwd1L70ebrVJw4/eZ79skrIaw==", 1026 | "dependencies": { 1027 | "pug-code-gen": "^3.0.2", 1028 | "pug-filters": "^4.0.0", 1029 | "pug-lexer": "^5.0.1", 1030 | "pug-linker": "^4.0.0", 1031 | "pug-load": "^3.0.0", 1032 | "pug-parser": "^6.0.0", 1033 | "pug-runtime": "^3.0.1", 1034 | "pug-strip-comments": "^2.0.0" 1035 | } 1036 | }, 1037 | "node_modules/pug-attrs": { 1038 | "version": "3.0.0", 1039 | "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz", 1040 | "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==", 1041 | "dependencies": { 1042 | "constantinople": "^4.0.1", 1043 | "js-stringify": "^1.0.2", 1044 | "pug-runtime": "^3.0.0" 1045 | } 1046 | }, 1047 | "node_modules/pug-code-gen": { 1048 | "version": "3.0.2", 1049 | "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.2.tgz", 1050 | "integrity": "sha512-nJMhW16MbiGRiyR4miDTQMRWDgKplnHyeLvioEJYbk1RsPI3FuA3saEP8uwnTb2nTJEKBU90NFVWJBk4OU5qyg==", 1051 | "dependencies": { 1052 | "constantinople": "^4.0.1", 1053 | "doctypes": "^1.1.0", 1054 | "js-stringify": "^1.0.2", 1055 | "pug-attrs": "^3.0.0", 1056 | "pug-error": "^2.0.0", 1057 | "pug-runtime": "^3.0.0", 1058 | "void-elements": "^3.1.0", 1059 | "with": "^7.0.0" 1060 | } 1061 | }, 1062 | "node_modules/pug-error": { 1063 | "version": "2.0.0", 1064 | "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.0.0.tgz", 1065 | "integrity": "sha512-sjiUsi9M4RAGHktC1drQfCr5C5eriu24Lfbt4s+7SykztEOwVZtbFk1RRq0tzLxcMxMYTBR+zMQaG07J/btayQ==" 1066 | }, 1067 | "node_modules/pug-filters": { 1068 | "version": "4.0.0", 1069 | "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-4.0.0.tgz", 1070 | "integrity": "sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==", 1071 | "dependencies": { 1072 | "constantinople": "^4.0.1", 1073 | "jstransformer": "1.0.0", 1074 | "pug-error": "^2.0.0", 1075 | "pug-walk": "^2.0.0", 1076 | "resolve": "^1.15.1" 1077 | } 1078 | }, 1079 | "node_modules/pug-lexer": { 1080 | "version": "5.0.1", 1081 | "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-5.0.1.tgz", 1082 | "integrity": "sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==", 1083 | "dependencies": { 1084 | "character-parser": "^2.2.0", 1085 | "is-expression": "^4.0.0", 1086 | "pug-error": "^2.0.0" 1087 | } 1088 | }, 1089 | "node_modules/pug-linker": { 1090 | "version": "4.0.0", 1091 | "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-4.0.0.tgz", 1092 | "integrity": "sha512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw==", 1093 | "dependencies": { 1094 | "pug-error": "^2.0.0", 1095 | "pug-walk": "^2.0.0" 1096 | } 1097 | }, 1098 | "node_modules/pug-load": { 1099 | "version": "3.0.0", 1100 | "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-3.0.0.tgz", 1101 | "integrity": "sha512-OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ==", 1102 | "dependencies": { 1103 | "object-assign": "^4.1.1", 1104 | "pug-walk": "^2.0.0" 1105 | } 1106 | }, 1107 | "node_modules/pug-parser": { 1108 | "version": "6.0.0", 1109 | "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-6.0.0.tgz", 1110 | "integrity": "sha512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw==", 1111 | "dependencies": { 1112 | "pug-error": "^2.0.0", 1113 | "token-stream": "1.0.0" 1114 | } 1115 | }, 1116 | "node_modules/pug-runtime": { 1117 | "version": "3.0.1", 1118 | "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz", 1119 | "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==" 1120 | }, 1121 | "node_modules/pug-strip-comments": { 1122 | "version": "2.0.0", 1123 | "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-2.0.0.tgz", 1124 | "integrity": "sha512-zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ==", 1125 | "dependencies": { 1126 | "pug-error": "^2.0.0" 1127 | } 1128 | }, 1129 | "node_modules/pug-walk": { 1130 | "version": "2.0.0", 1131 | "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-2.0.0.tgz", 1132 | "integrity": "sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ==" 1133 | }, 1134 | "node_modules/qs": { 1135 | "version": "6.11.0", 1136 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 1137 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 1138 | "dependencies": { 1139 | "side-channel": "^1.0.4" 1140 | }, 1141 | "engines": { 1142 | "node": ">=0.6" 1143 | }, 1144 | "funding": { 1145 | "url": "https://github.com/sponsors/ljharb" 1146 | } 1147 | }, 1148 | "node_modules/random-bytes": { 1149 | "version": "1.0.0", 1150 | "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", 1151 | "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==", 1152 | "engines": { 1153 | "node": ">= 0.8" 1154 | } 1155 | }, 1156 | "node_modules/range-parser": { 1157 | "version": "1.2.1", 1158 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1159 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 1160 | "engines": { 1161 | "node": ">= 0.6" 1162 | } 1163 | }, 1164 | "node_modules/raw-body": { 1165 | "version": "2.5.1", 1166 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 1167 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 1168 | "dependencies": { 1169 | "bytes": "3.1.2", 1170 | "http-errors": "2.0.0", 1171 | "iconv-lite": "0.4.24", 1172 | "unpipe": "1.0.0" 1173 | }, 1174 | "engines": { 1175 | "node": ">= 0.8" 1176 | } 1177 | }, 1178 | "node_modules/resolve": { 1179 | "version": "1.22.8", 1180 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", 1181 | "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", 1182 | "dependencies": { 1183 | "is-core-module": "^2.13.0", 1184 | "path-parse": "^1.0.7", 1185 | "supports-preserve-symlinks-flag": "^1.0.0" 1186 | }, 1187 | "bin": { 1188 | "resolve": "bin/resolve" 1189 | }, 1190 | "funding": { 1191 | "url": "https://github.com/sponsors/ljharb" 1192 | } 1193 | }, 1194 | "node_modules/safe-buffer": { 1195 | "version": "5.2.1", 1196 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1197 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1198 | "funding": [ 1199 | { 1200 | "type": "github", 1201 | "url": "https://github.com/sponsors/feross" 1202 | }, 1203 | { 1204 | "type": "patreon", 1205 | "url": "https://www.patreon.com/feross" 1206 | }, 1207 | { 1208 | "type": "consulting", 1209 | "url": "https://feross.org/support" 1210 | } 1211 | ] 1212 | }, 1213 | "node_modules/safer-buffer": { 1214 | "version": "2.1.2", 1215 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1216 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1217 | }, 1218 | "node_modules/send": { 1219 | "version": "0.18.0", 1220 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 1221 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 1222 | "dependencies": { 1223 | "debug": "2.6.9", 1224 | "depd": "2.0.0", 1225 | "destroy": "1.2.0", 1226 | "encodeurl": "~1.0.2", 1227 | "escape-html": "~1.0.3", 1228 | "etag": "~1.8.1", 1229 | "fresh": "0.5.2", 1230 | "http-errors": "2.0.0", 1231 | "mime": "1.6.0", 1232 | "ms": "2.1.3", 1233 | "on-finished": "2.4.1", 1234 | "range-parser": "~1.2.1", 1235 | "statuses": "2.0.1" 1236 | }, 1237 | "engines": { 1238 | "node": ">= 0.8.0" 1239 | } 1240 | }, 1241 | "node_modules/send/node_modules/debug": { 1242 | "version": "2.6.9", 1243 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 1244 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 1245 | "dependencies": { 1246 | "ms": "2.0.0" 1247 | } 1248 | }, 1249 | "node_modules/send/node_modules/debug/node_modules/ms": { 1250 | "version": "2.0.0", 1251 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1252 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 1253 | }, 1254 | "node_modules/send/node_modules/ms": { 1255 | "version": "2.1.3", 1256 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1257 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1258 | }, 1259 | "node_modules/serve-static": { 1260 | "version": "1.15.0", 1261 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 1262 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 1263 | "dependencies": { 1264 | "encodeurl": "~1.0.2", 1265 | "escape-html": "~1.0.3", 1266 | "parseurl": "~1.3.3", 1267 | "send": "0.18.0" 1268 | }, 1269 | "engines": { 1270 | "node": ">= 0.8.0" 1271 | } 1272 | }, 1273 | "node_modules/set-function-length": { 1274 | "version": "1.2.0", 1275 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", 1276 | "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", 1277 | "dependencies": { 1278 | "define-data-property": "^1.1.1", 1279 | "function-bind": "^1.1.2", 1280 | "get-intrinsic": "^1.2.2", 1281 | "gopd": "^1.0.1", 1282 | "has-property-descriptors": "^1.0.1" 1283 | }, 1284 | "engines": { 1285 | "node": ">= 0.4" 1286 | } 1287 | }, 1288 | "node_modules/setprototypeof": { 1289 | "version": "1.2.0", 1290 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1291 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 1292 | }, 1293 | "node_modules/side-channel": { 1294 | "version": "1.0.4", 1295 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1296 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1297 | "dependencies": { 1298 | "call-bind": "^1.0.0", 1299 | "get-intrinsic": "^1.0.2", 1300 | "object-inspect": "^1.9.0" 1301 | }, 1302 | "funding": { 1303 | "url": "https://github.com/sponsors/ljharb" 1304 | } 1305 | }, 1306 | "node_modules/statuses": { 1307 | "version": "2.0.1", 1308 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1309 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1310 | "engines": { 1311 | "node": ">= 0.8" 1312 | } 1313 | }, 1314 | "node_modules/supports-preserve-symlinks-flag": { 1315 | "version": "1.0.0", 1316 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1317 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1318 | "engines": { 1319 | "node": ">= 0.4" 1320 | }, 1321 | "funding": { 1322 | "url": "https://github.com/sponsors/ljharb" 1323 | } 1324 | }, 1325 | "node_modules/to-fast-properties": { 1326 | "version": "2.0.0", 1327 | "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", 1328 | "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", 1329 | "engines": { 1330 | "node": ">=4" 1331 | } 1332 | }, 1333 | "node_modules/toidentifier": { 1334 | "version": "1.0.1", 1335 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1336 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1337 | "engines": { 1338 | "node": ">=0.6" 1339 | } 1340 | }, 1341 | "node_modules/token-stream": { 1342 | "version": "1.0.0", 1343 | "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-1.0.0.tgz", 1344 | "integrity": "sha512-VSsyNPPW74RpHwR8Fc21uubwHY7wMDeJLys2IX5zJNih+OnAnaifKHo+1LHT7DAdloQ7apeaaWg8l7qnf/TnEg==" 1345 | }, 1346 | "node_modules/type-is": { 1347 | "version": "1.6.18", 1348 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1349 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1350 | "dependencies": { 1351 | "media-typer": "0.3.0", 1352 | "mime-types": "~2.1.24" 1353 | }, 1354 | "engines": { 1355 | "node": ">= 0.6" 1356 | } 1357 | }, 1358 | "node_modules/uid-safe": { 1359 | "version": "2.1.5", 1360 | "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", 1361 | "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", 1362 | "dependencies": { 1363 | "random-bytes": "~1.0.0" 1364 | }, 1365 | "engines": { 1366 | "node": ">= 0.8" 1367 | } 1368 | }, 1369 | "node_modules/uid2": { 1370 | "version": "0.0.4", 1371 | "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.4.tgz", 1372 | "integrity": "sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==" 1373 | }, 1374 | "node_modules/unpipe": { 1375 | "version": "1.0.0", 1376 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1377 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1378 | "engines": { 1379 | "node": ">= 0.8" 1380 | } 1381 | }, 1382 | "node_modules/utils-merge": { 1383 | "version": "1.0.1", 1384 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1385 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 1386 | "engines": { 1387 | "node": ">= 0.4.0" 1388 | } 1389 | }, 1390 | "node_modules/vary": { 1391 | "version": "1.1.2", 1392 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1393 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 1394 | "engines": { 1395 | "node": ">= 0.8" 1396 | } 1397 | }, 1398 | "node_modules/void-elements": { 1399 | "version": "3.1.0", 1400 | "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", 1401 | "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", 1402 | "engines": { 1403 | "node": ">=0.10.0" 1404 | } 1405 | }, 1406 | "node_modules/with": { 1407 | "version": "7.0.2", 1408 | "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", 1409 | "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==", 1410 | "dependencies": { 1411 | "@babel/parser": "^7.9.6", 1412 | "@babel/types": "^7.9.6", 1413 | "assert-never": "^1.2.1", 1414 | "babel-walk": "3.0.0-canary-5" 1415 | }, 1416 | "engines": { 1417 | "node": ">= 10.0.0" 1418 | } 1419 | } 1420 | } 1421 | } 1422 | -------------------------------------------------------------------------------- /01-Login/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "auth0-nodejs-webapp-sample-new-test", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "connect-flash": "^0.1.1", 10 | "cookie-parser": "^1.4.6", 11 | "debug": "~4.3.4", 12 | "dotenv": "^16.3.0", 13 | "express": "~4.18.2", 14 | "express-session": "^1.17.3", 15 | "http-errors": "~2.0.0", 16 | "morgan": "~1.10.0", 17 | "passport": "^0.7.0", 18 | "passport-auth0": "^1.4.4", 19 | "pug": "^3.0.2" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /01-Login/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | .w3-container a { 2 | color: #337ab7; 3 | text-decoration: none; 4 | } 5 | 6 | pre { 7 | text-align: left; 8 | font-family: 'Courier New', Courier, monospace; 9 | background-color: #343f5f; 10 | color: #fdfeff; 11 | overflow: scroll; 12 | border: 1px #929090 solid; 13 | padding: 15px 14 | } 15 | 16 | .w3-card-4 { 17 | padding: 15px; 18 | } -------------------------------------------------------------------------------- /01-Login/routes/auth.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | var passport = require('passport'); 4 | var dotenv = require('dotenv'); 5 | var util = require('util'); 6 | var url = require('url'); 7 | var querystring = require('querystring'); 8 | 9 | dotenv.config(); 10 | 11 | // Perform the login, after login Auth0 will redirect to callback 12 | router.get('/login', passport.authenticate('auth0', { 13 | scope: 'openid email profile' 14 | }), function (req, res) { 15 | res.redirect('/'); 16 | }); 17 | 18 | // Perform the final stage of authentication and redirect to previously requested URL or '/user' 19 | router.get('/callback', function (req, res, next) { 20 | passport.authenticate('auth0', function (err, user, info) { 21 | if (err) { return next(err); } 22 | if (!user) { return res.redirect('/login'); } 23 | req.logIn(user, function (err) { 24 | if (err) { return next(err); } 25 | const returnTo = req.session.returnTo; 26 | delete req.session.returnTo; 27 | res.redirect(returnTo || '/user'); 28 | }); 29 | })(req, res, next); 30 | }); 31 | 32 | // Perform session logout and redirect to homepage 33 | router.get('/logout', (req, res) => { 34 | req.logout(); 35 | 36 | var returnTo = req.protocol + '://' + req.hostname; 37 | var port = req.connection.localPort; 38 | if (port !== undefined && port !== 80 && port !== 443) { 39 | returnTo += ':' + port; 40 | } 41 | 42 | var logoutURL = new url.URL( 43 | util.format('https://%s/v2/logout', process.env.AUTH0_DOMAIN) 44 | ); 45 | var searchString = querystring.stringify({ 46 | client_id: process.env.AUTH0_CLIENT_ID, 47 | returnTo: returnTo 48 | }); 49 | logoutURL.search = searchString; 50 | 51 | res.redirect(logoutURL); 52 | }); 53 | 54 | module.exports = router; 55 | -------------------------------------------------------------------------------- /01-Login/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function (req, res, next) { 6 | res.render('index', { title: 'Auth0 Webapp sample Nodejs' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /01-Login/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var secured = require('../lib/middleware/secured'); 3 | var router = express.Router(); 4 | 5 | /* GET user profile. */ 6 | router.get('/user', secured(), function (req, res, next) { 7 | const { _raw, _json, ...userProfile } = req.user; 8 | res.render('user', { 9 | userProfile: JSON.stringify(userProfile, null, 2), 10 | title: 'Profile page' 11 | }); 12 | }); 13 | 14 | module.exports = router; 15 | -------------------------------------------------------------------------------- /01-Login/views/error.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /01-Login/views/failure.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= error 5 | pre #{error_description} 6 | -------------------------------------------------------------------------------- /01-Login/views/index.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .w3-container 5 | if locals.user 6 | h4 You are logged in! 7 | else 8 | h4 You are not logged in! Please #[a(href="/login") Log In] to continue. 9 | -------------------------------------------------------------------------------- /01-Login/views/layout.pug: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | link(rel='stylesheet', href='https://www.w3schools.com/w3css/4/w3.css') 7 | link(rel='shortcut icon', href='//cdn2.auth0.com/styleguide/latest/lib/logos/img/favicon.png') 8 | 9 | body 10 | nav.w3-bar.w3-border.w3-light-grey( role="navigation" ) 11 | .w3-bar-item.w3-text-grey Auth0 - NodeJS 12 | a(href="/").w3-bar-item.w3-button Home 13 | if locals.user 14 | a(href="/user" id="profileDropDown").w3-bar-item.w3-button Profile 15 | a(id="qsLogoutBtn" href="/logout").w3-bar-item.w3-button Log Out 16 | else 17 | a(id="qsLoginBtn" href="/login").w3-bar-item.w3-button Log In 18 | block content 19 | -------------------------------------------------------------------------------- /01-Login/views/user.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | .w3-card-4 5 | h1 Welcome #{user.nickname} 6 | img(src=user.picture) 7 | h2 User profile 8 | p This is the content of req.user. 9 | p Note: _raw and _json properties have been ommited. 10 | pre 11 | code #{userProfile} 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Auth0 Samples 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Auth0 Node Web App Samples 2 | 3 | [![CircleCI](https://circleci.com/gh/auth0-samples/auth0-nodejs-webapp-sample.svg?style=svg)](https://circleci.com/gh/auth0-samples/auth0-nodejs-webapp-sample) 4 | 5 | These samples demonstrate how to add authentication to a Node.js application with Auth0. Each folder contains a distinct application so that various Auth0 features can be viewed in isolation. 6 | 7 | ## Embedded Integration Samples 8 | 9 | These samples use Auth0's [hosted login page](https://auth0.com/docs/hosted-pages/login) which offers the fastest, most secure, and most feature-rich way to add authentication to your app. 10 | 11 | For samples which demonstrate how to embed the Lock widget or a custom login form directly into your application, see the [embedded-login](https://github.com/auth0-samples/auth0-nodejs-webapp-sample/tree/embedded-login) branch. 12 | 13 | ## What is Auth0? 14 | 15 | Auth0 helps you to: 16 | 17 | * Add authentication with [multiple authentication sources](https://auth0.com/docs/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, among others**, or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider**. 18 | * Add authentication through more traditional **[username/password databases](https://auth0.com/docs/connections/database/custom-db)**. 19 | * Add support for **[linking different user accounts](https://auth0.com/docs/users/user-account-linking)** with the same user. 20 | * Support for generating signed [Json Web Tokens](https://auth0.com/docs/tokens/json-web-tokens) to call your APIs and **flow the user identity** securely. 21 | * Analytics of how, when and where users are logging in. 22 | * Pull data from other sources and add it to the user profile, through [JavaScript rules](https://auth0.com/docs/rules). 23 | 24 | ## Create a free Auth0 account 25 | 26 | 1. Go to [Auth0](https://auth0.com/signup) and click Sign Up. 27 | 2. Use Google, GitHub or Microsoft Account to login. 28 | 29 | ## Issue Reporting 30 | 31 | 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](https://auth0.com/whitehat) details the procedure for disclosing security issues. 32 | 33 | ## Author 34 | 35 | [Auth0](auth0.com) 36 | 37 | ## License 38 | 39 | This project is licensed under the MIT license. See the [LICENSE](LICENSE.txt) file for more info. 40 | --------------------------------------------------------------------------------