From b5d2d0c4b46e21693cfb8312a12118cba33e2422 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 10 Jan 2023 17:48:36 -0600 Subject: [PATCH] Increase Fleet Sandbox time to five days (#9251) Changes: - Updated the expiration timestamp of new Fleet Sandbox instances to be five days from when a user signs up. (Previously 24 hours) --- website/api/controllers/entrance/signup.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/api/controllers/entrance/signup.js b/website/api/controllers/entrance/signup.js index 994a350db8..ce10fe25c2 100644 --- a/website/api/controllers/entrance/signup.js +++ b/website/api/controllers/entrance/signup.js @@ -102,8 +102,9 @@ the account verification message.)`, // Provisioning a Fleet sandbox instance for the new user. Note: Because this is the only place where we provision Sandbox instances, We'll provision a Sandbox instance BEFORE // creating the new User record. This way, if this fails, we won't save the new record to the database, and the user will see an error on the signup form asking them to try again. + const FIVE_DAYS_IN_MS = (5*24*60*60*1000); // Creating an expiration JS timestamp for the Fleet sandbox instance. NOTE: We send this value to the cloud provisioner API as an ISO 8601 string. - let fleetSandboxExpiresAt = Date.now() + (24*60*60*1000); + let fleetSandboxExpiresAt = Date.now() + FIVE_DAYS_IN_MS; // Creating a fleetSandboxDemoKey, this will be used for the user's password when we log them into their Sandbox instance. let fleetSandboxDemoKey = await sails.helpers.strings.uuid();