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

@@ -86,6 +86,7 @@ export class Config {
logLevels,
rateLimit,
databaseOptions,
extendSessionOnUse,
}) {
if (masterKey === readOnlyMasterKey) {
throw new Error('masterKey and readOnlyMasterKey should be different');
@@ -103,6 +104,10 @@ export class Config {
throw 'revokeSessionOnPasswordReset must be a boolean value';
}
if (typeof extendSessionOnUse !== 'boolean') {
throw 'extendSessionOnUse must be a boolean value';
}
if (publicServerURL) {
if (!publicServerURL.startsWith('http://') && !publicServerURL.startsWith('https://')) {
throw 'publicServerURL should be a valid HTTPS URL starting with https://';