Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions Parse-Dashboard/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ module.exports = function(config, options) {
const useEncryptedPasswords = config.useEncryptedPasswords ? true : false;
const authInstance = new Authentication(users, useEncryptedPasswords, mountPath);
authInstance.initialize(app, {
cookieSessionSecret: options.cookieSessionSecret,
cookieSessionSecret: options.cookieSessionSecret || config.cookieSessionSecret,
cookieSessionMaxAge: options.cookieSessionMaxAge,
cookieSessionStore: options.cookieSessionStore
cookieSessionStore: options.cookieSessionStore || config.cookieSessionStore
});

// CSRF error handler
Expand Down
2 changes: 1 addition & 1 deletion Parse-Dashboard/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ module.exports = (options) => {
config.data.trustProxy = trustProxy;
const dashboardOptions = {
allowInsecureHTTP,
cookieSessionSecret,
cookieSessionSecret: cookieSessionSecret || config.data.cookieSessionSecret,
dev,
cookieSessionMaxAge,
cookieSessionStore: config.data.cookieSessionStore
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ When deploying Parse Dashboard with multiple replicas behind a load balancer, yo

#### Using a Custom Session Store

Parse Dashboard supports using any session store compatible with [express-session](https://github.com/expressjs/session). The `sessionStore` option must be configured programmatically when initializing the dashboard.
Parse Dashboard supports using any session store compatible with [express-session](https://github.com/expressjs/session). Both `cookieSessionSecret` and `cookieSessionStore` can be configured either programmatically when initializing the dashboard or via a configuration file (note: `cookieSessionStore` can only be configured programmatically as it requires an object instance).

**Suggested Session Stores:**

Expand Down Expand Up @@ -851,6 +851,21 @@ const dashboard = new ParseDashboard({
cookieSessionStore,
cookieSessionSecret: 'your-secret-key',
});
```

**Example using a configuration file:**

When starting the dashboard with a config file, you can specify `cookieSessionSecret` directly in the JSON configuration:

```json
{
"apps": [...],
"users": [...],
"cookieSessionSecret": "your-secret-key"
}
```

Note: `cookieSessionStore` must still be configured programmatically as it requires an object instance, but `cookieSessionSecret` can now be specified in the config file for convenience.

**Important Notes:**

Expand Down
52 changes: 14 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading