Skip to content

Commit f78c4a2

Browse files
committed
Require authentication for all recording modes
Refactored video pre-creation logic to require user authentication for both instant and studio recording modes. Previously, only instant mode required sign-in; now, both modes will prompt the user to sign in if not authenticated.
1 parent e16a192 commit f78c4a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/desktop/src-tauri/src/recording.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ pub async fn start_recording(
395395
let _ = window.set_content_protected(matches!(inputs.mode, RecordingMode::Studio));
396396
}
397397

398+
// Pre-create video for both instant and studio mode
398399
let video_upload_info = match inputs.mode {
399400
RecordingMode::Instant => {
400401
match AuthStore::get(&app).ok().flatten() {
@@ -422,7 +423,7 @@ pub async fn start_recording(
422423
return Ok(RecordingAction::UpgradeRequired);
423424
}
424425
Err(err) => {
425-
error!("Error creating instant mode video: {err}");
426+
error!("Error creating video: {err}");
426427
return Err(err.to_string());
427428
}
428429
};
@@ -443,10 +444,9 @@ pub async fn start_recording(
443444
config: s3_config,
444445
})
445446
}
446-
// Allow the recording to proceed without error for any signed-in user
447447
_ => {
448-
// User is not signed in
449-
return Err("Please sign in to use instant recording".to_string());
448+
// User is not signed in - both modes require authentication now
449+
return Err("Please sign in to record".to_string());
450450
}
451451
}
452452
}

0 commit comments

Comments
 (0)