Skip to content

Commit

Permalink
docs(oidc): fix misc express js example values (#7199)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-elliott committed Apr 18, 2024
1 parent 5057db6 commit 2ffb407
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion docs/content/integration/openid-connect/expressjs/index.md
Expand Up @@ -78,7 +78,9 @@ mkdir authelia-example && cd authelia-example && npm init -y && npm install expr
This application example assumes you're proxying the Node service with a proxy handling TLS termination for
`https://express.example.com`.

```js
```js {title="server.js"}
"use strict";

const express = require('express');
const { auth, requiresAuth } = require('express-openid-connect');
const { randomBytes } = require('crypto');
Expand Down Expand Up @@ -117,12 +119,17 @@ app.get('/', requiresAuth(), (req, res) => {
res.send(`<html lang='en'><body><pre><code>${data}</code></pre></body></html>`);
});
});

app.listen(3000, function () {
console.log("Listening on port 3000")
});
```

Environment Example:

```env
APP_BASE_URL=https://express.example.com
SESSION_ENCRYPTION_SECRET=
OIDC_ISSUER=https://auth.example.com
OIDC_CLIENT_ID=Express.js
OIDC_CLIENT_SECRET=insecure_secret
Expand Down
2 changes: 1 addition & 1 deletion docs/content/integration/openid-connect/synapse/index.md
Expand Up @@ -66,7 +66,7 @@ To configure [Synapse] to utilize Authelia as an [OpenID Connect 1.0] Provider:

1. Edit your [Synapse] `homeserver.yaml` configuration file and add configure the following:

```yaml {title="configuration.yml"}
```yaml {title="homeserver.yaml"}
oidc_providers:
- idp_id: authelia
idp_name: "Authelia"
Expand Down

0 comments on commit 2ffb407

Please sign in to comment.