Skip to content

Commit

Permalink
Merge pull request #63 from auth0/fix/peer-dependency
Browse files Browse the repository at this point in the history
Register Express as a peer dependency
  • Loading branch information
lbalmaceda authored Feb 7, 2020
2 parents ab97576 + 5ce1ec1 commit c918849
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Express.js middleware for OpenID Relying Party (aka OAuth 2.0 Client). Easily ad
This library requires:

- Node v10.13 or higher
- Express v4.16 or higher
- Express v4.17 or higher

**Please Note:** This library is currently in pre-release status and has not had a complete security review. We **do not** recommend using this library in production yet. As we move towards early access, please be aware that releases may contain breaking changes. We will be monitoring the Issues queue here for feedback and questions. PRs and comments on existing PRs are welcome!

Expand Down Expand Up @@ -60,13 +60,15 @@ APP_SESSION_SECRET=LONG_RANDOM_VALUE
```js
// index.js

const { auth } = require('express-openid-connect');
app.use(auth({
issuerBaseURL: 'https://YOUR_DOMAIN',
baseURL: 'https://YOUR_APPLICATION_ROOT_URL',
clientID: 'YOUR_CLIENT_ID',
appSessionKey: 'LONG_RANDOM_STRING'
}));
const { auth } = require("express-openid-connect");
app.use(
auth({
issuerBaseURL: "https://YOUR_DOMAIN",
baseURL: "https://YOUR_APPLICATION_ROOT_URL",
clientID: "YOUR_CLIENT_ID",
appSessionSecret: "LONG_RANDOM_STRING"
})
);
```

With this basic configuration, your application will require authentication for all routes and store the user identity in an encrypted and signed cookie.
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"test": "mocha",
"test:ci": "nyc --reporter=lcov npm test"
},
"peerDependencies": {
"express": ">= 4.17.0"
},
"dependencies": {
"@hapi/joi": "^16.1.8",
"cb": "^0.1.0",
Expand Down

0 comments on commit c918849

Please sign in to comment.