Skip to content
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
1 change: 1 addition & 0 deletions developer-docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ module.exports = {
'/latest/concepts/requests-responses',
'/latest/concepts/routing',
'/latest/concepts/services',
'/latest/concepts/sso',
'/latest/concepts/templates',
'/latest/concepts/webhooks',
],
Expand Down
13 changes: 12 additions & 1 deletion developer-docs/latest/concepts/configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ This is an example of a full configuration, typically certain keys do not need t

**Path —** `./config/server.js`.

```js
```javascript
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
Expand All @@ -226,6 +226,14 @@ module.exports = ({ env }) => ({
},
admin: {
auth: {
events: {
onConnectionSuccess(e) {
console.log(e.user, e.provider);
},
onConnectionError(e) {
console.error(e.error, e.provider);
},
},
secret: env('ADMIN_JWT_SECRET', 'someSecretKey'),
},
url: env('PUBLIC_ADMIN_URL', '/dashboard'),
Expand Down Expand Up @@ -264,6 +272,9 @@ module.exports = ({ env }) => ({
| `admin` | Admin panel configuration | Object | |
| `admin.auth` | Authentication configuration | Object | |
| `admin.auth.secret`| Secret used to encode JWT tokens | string| `undefined` |
| `admin.auth.events`| Record of all the events subscribers registered for the authentication | object| `{}` |
| `admin.auth.events.onConnectionSuccess`| Function called when an admin user log in successfully to the administration panel | function | `undefined` |
| `admin.auth.events.onConnectionError`| Function called when an admin user fails to log in to the administration panel | function| `undefined` |
| `admin.url` | Url of your admin panel. Default value: `/admin`. Note: If the url is relative, it will be concatenated with `url`. | string | `/admin` |
| `admin.autoOpen` | Enable or disabled administration opening on start. | boolean | `true` |
| `admin.watchIgnoreFiles` | Add custom files that should not be watched during development. See more [here](https://github.com/paulmillr/chokidar#path-filtering) (property `ignored`). | Array(string) | `[]` |
Expand Down
Loading