feat: extendSessionOnUse to automatically renew Parse Sessions (#8505)

This commit is contained in:
Daniel
2023-05-18 03:49:25 +10:00
committed by GitHub
parent 559b1de828
commit 6f885d36b9
7 changed files with 108 additions and 2 deletions

View File

@@ -227,6 +227,12 @@ module.exports.ParseServerOptions = {
action: parsers.booleanParser,
default: true,
},
extendSessionOnUse: {
env: 'PARSE_SERVER_EXTEND_SESSION_ON_USE',
help: 'Whether Parse Server should automatically extend a valid session by the sessionLength',
action: parsers.booleanParser,
default: false,
},
fileKey: {
env: 'PARSE_SERVER_FILE_KEY',
help: 'Key for your files',

View File

@@ -43,6 +43,7 @@
* @property {String} encryptionKey Key for encrypting your files
* @property {Boolean} enforcePrivateUsers Set to true if new users should be created without public read and write access.
* @property {Boolean} expireInactiveSessions Sets whether we should expire the inactive sessions, defaults to true. If false, all new sessions are created with no expiration date.
* @property {Boolean} extendSessionOnUse Whether Parse Server should automatically extend a valid session by the sessionLength
* @property {String} fileKey Key for your files
* @property {Adapter<FilesAdapter>} filesAdapter Adapter module for the files sub-system
* @property {FileUploadOptions} fileUpload Options for file uploads

View File

@@ -203,6 +203,9 @@ export interface ParseServerOptions {
/* Session duration, in seconds, defaults to 1 year
:DEFAULT: 31536000 */
sessionLength: ?number;
/* Whether Parse Server should automatically extend a valid session by the sessionLength
:DEFAULT: false */
extendSessionOnUse: ?boolean;
/* Default value for limit option on queries, defaults to `100`.
:DEFAULT: 100 */
defaultLimit: ?number;