diff --git a/TASKS.md b/TASKS.md index fd5d74a..bf47086 100644 --- a/TASKS.md +++ b/TASKS.md @@ -13,11 +13,11 @@ --- -## TASK 2 — YouTube OAuth2 Authentication (optional, non-blocking) +## TASK 2 — YouTube OAuth2 Authentication **Goal:** Fully working Google OAuth2 flow — user clicks "YouTube", browser opens, authorization callback lands, channel info is stored. -**Design constraint:** Sign-in must NEVER block core usage. Users can go live with a manual stream key, build scenes, and record without authenticating. OAuth is an enhancement — it unlocks live chat, broadcast creation, scheduling, and YouTube-side health — not a prerequisite. +**Design constraint:** Sign-in must NEVER block core exploration. Users can build scenes, add sources, and audition the software without authenticating. But **going live requires authentication** — "Go Live" only appears once connected. OAuth is what unlocks the actual broadcast (plus live chat, scheduling, and YouTube-side health). ### Requirements: @@ -26,7 +26,7 @@ 3. **Browser launch** — open the authorization URL in the default browser 4. **Token persistence** — store access/refresh tokens securely (Windows DPAPI), reload on startup 5. **UI state** — account name/avatar shown when connected; "sign in (optional)" affordance, never a gate -6. **Stream key entry stays manual** — OAuth does not replace the manual stream key path +6. **Go Live gated on auth** — "Go Live" button only visible once authenticated; scene building works without it ### Tests: diff --git a/ViewModels/MainViewModel.cs b/ViewModels/MainViewModel.cs index 39d5ceb..9032c54 100644 --- a/ViewModels/MainViewModel.cs +++ b/ViewModels/MainViewModel.cs @@ -77,7 +77,7 @@ public class MainViewModel : ViewModelBase } public bool ShowConnect => !IsYouTubeConnected; - public bool ShowGoLive => IsOffline; + public bool ShowGoLive => IsYouTubeConnected && IsOffline; // Commands public ICommand AddSceneCommand { get; } @@ -97,7 +97,7 @@ public class MainViewModel : ViewModelBase AddSceneCommand = new RelayCommand(_ => AddScene()); RemoveSceneCommand = new RelayCommand(scene => RemoveScene(scene as Scene)); ConnectCommand = new RelayCommand(_ => ConnectYouTube()); - GoLiveCommand = new RelayCommand(_ => StartStream(), _ => IsOffline); + GoLiveCommand = new RelayCommand(_ => StartStream(), _ => IsYouTubeConnected && IsOffline); EndStreamCommand = new RelayCommand(_ => StopStream(), _ => IsLive); // Start with a default scene diff --git a/ai.md b/ai.md index 2a7ad49..8237380 100644 --- a/ai.md +++ b/ai.md @@ -51,9 +51,9 @@ Apply this to every UI decision: - Visual/drag-and-drop scene building over property panels - Every action produces a visible outcome — no dead ends -## Auth is optional, never a gate +## Auth gates Go Live, but not exploration -YouTube OAuth2 sign-in must NEVER block core usage. Users can go live with a manual stream key, -build scenes, and record without authenticating. OAuth is an enhancement — it unlocks live chat, -broadcast creation, scheduling, and YouTube-side health — not a prerequisite. Treat the sign-in -button as "sign in (optional)", never as a requirement to use the app. +The app is fully usable without authentication: users can build scenes, add sources, compose +previews, and audition the software with zero commitment. But **going live requires authentication** — +it's the one capability gated behind YouTube sign-in. The sign-in button should never pressure the +user ("sign in (optional)", not a modal wall), but "Go Live" only appears once connected.