diff --git a/static/js/launch_progress.js b/static/js/launch_progress.js
index 49ea4c8..ce373b5 100644
--- a/static/js/launch_progress.js
+++ b/static/js/launch_progress.js
@@ -123,6 +123,18 @@ function initializeSteps() {
`;
stepsContainer.appendChild(healthStep);
+
+ // Add Authentication step
+ const authStep = document.createElement('div');
+ authStep.className = 'step-item';
+ authStep.innerHTML = `
+
+
Instance Authentication
+
Setting up instance authentication...
+
+ `;
+ stepsContainer.appendChild(authStep);
}
async function startLaunch(data) {
@@ -410,9 +422,65 @@ async function startLaunch(data) {
healthStep.querySelector('.step-content').appendChild(retryButton);
}
+ // After health check, add authentication step
+ await updateStep(10, 'Instance Authentication', 'Setting up instance authentication...');
+ const authResult = await authenticateInstance(`https://${data.webAddresses[0]}`, data.instanceId);
+
+ if (!authResult.success) {
+ throw new Error(`Authentication failed: ${authResult.error}`);
+ }
+
+ // Update the auth step to show success
+ const authStep = document.querySelectorAll('.step-item')[9];
+ authStep.classList.remove('active');
+ authStep.classList.add('completed');
+ authStep.querySelector('.step-status').textContent = authResult.alreadyAuthenticated ?
+ 'Instance is already authenticated' :
+ 'Successfully authenticated instance';
+
+ // Add authentication details
+ const authDetails = document.createElement('div');
+ authDetails.className = 'mt-3';
+ authDetails.innerHTML = `
+