Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register Express as a peer dependency #63

Merged
merged 2 commits into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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