Skip to content

Commit

Permalink
Update README.md (#192)
Browse files Browse the repository at this point in the history
* Update README.md

Directly link to a few helpful places in the documentation.

* docs: fix authorizationParams example in docs

* chore: fix eslintignore for coverage

* Add clientSecret env config

* PR feedback

Co-authored-by: Adam Mcgrath <[email protected]>
  • Loading branch information
joshcanhelp and adamjmcgrath authored Feb 23, 2021
1 parent deb4279 commit 3adcd92
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
CHANGELOG.md
coverage
.nyc_output
docs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ With this basic configuration, your application will require authentication for

See the [examples](EXAMPLES.md) for route-specific authentication, custom application session handling, requesting and using access tokens for external APIs, and more.

See the [API documentation](https://auth0.github.io/express-openid-connect) for additional configuration possibilities and provided methods.
See the [API documentation](https://auth0.github.io/express-openid-connect) for [additional configuration possibilities](https://auth0.github.io/express-openid-connect/interfaces/configparams.html) and [provided methods](https://auth0.github.io/express-openid-connect/globals.html#attemptsilentlogin).

## A note on error handling

Expand Down
19 changes: 14 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,17 @@ interface LogoutOptions {
* Configuration parameters passed to the `auth()` middleware.
*
* {@link ConfigParams.issuerBaseURL issuerBaseURL}, {@link ConfigParams.baseURL baseURL}, {@link ConfigParams.clientID clientID}
* and {@link ConfigParams.secret secret} are required but can be configured with environmental variables:
* and {@link ConfigParams.secret secret} are required but can be configured with environmental variables. {@link ConfigParams.clientSecret clientSecret} is not required but can also be configured this way.
*
* ```js
* # Required
* ISSUER_BASE_URL=https://YOUR_DOMAIN
* CLIENT_ID=YOUR_CLIENT_ID
* BASE_URL=https://YOUR_APPLICATION_ROOT_URL
* CLIENT_ID=YOUR_CLIENT_ID
* SECRET=LONG_RANDOM_VALUE
*
* # Not required
* CLIENT_SECRET=YOUR_CLIENT_SECRET
* ```
*/
interface ConfigParams {
Expand Down Expand Up @@ -234,8 +238,8 @@ interface ConfigParams {
* ```js
* {
* response_type: 'id_token',
* response_mode: 'form_post,
* scope: openid profile email'
* response_mode: 'form_post',
* scope: 'openid profile email'
* }
* ```
*
Expand Down Expand Up @@ -355,7 +359,12 @@ interface ConfigParams {
* }))
* ``
*/
afterCallback?: (req: OpenidRequest, res: OpenidResponse, session: Session, decodedState: {[key: string]: any}) => Promise<Session> | Session;
afterCallback?: (
req: OpenidRequest,
res: OpenidResponse,
session: Session,
decodedState: { [key: string]: any }
) => Promise<Session> | Session;

/**
* Array value of claims to remove from the ID token before storing the cookie session.
Expand Down

0 comments on commit 3adcd92

Please sign in to comment.