End Livestream completes the session: StopStream clears the OAuth session and DPAPI token (crash-safe sign-out)
This commit is contained in:
@@ -39,6 +39,12 @@ public class YouTubeAuthService
|
||||
CurrentChannel = channel;
|
||||
}
|
||||
|
||||
/// <summary>Signs out: drops the in-memory session (a graceful End Livestream clears the saved token via the caller).</summary>
|
||||
public void ClearSession()
|
||||
{
|
||||
CurrentChannel = null;
|
||||
}
|
||||
|
||||
public string GetAuthorizationUrl(string redirectUri)
|
||||
{
|
||||
var query = new[]
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ External-facing logic: YouTube API, persistence. See
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `YouTubeAuthService.cs` | OAuth2 via Google: loopback callback (`http://localhost:8765/oauth2/callback`), token exchange, refresh, channel fetch. Constructor takes optional `HttpClient` + `sessionChanged` callback (test seam + save hook); session persists via `Helpers/TokenStore` (DPAPI) |
|
||||
| `YouTubeAuthService.cs` | OAuth2 via Google: loopback callback (`http://localhost:8765/oauth2/callback`), token exchange, refresh, channel fetch. Constructor takes optional `HttpClient` + `sessionChanged` callback (test seam + save hook); session persists via `Helpers/TokenStore` (DPAPI); `ClearSession()` signs out (called by `MainViewModel.StopStream` on End Livestream) |
|
||||
| `YouTubeStreamService.cs` | Broadcast/stream management via the v3 API (`enableAutoStart/Stop`). **Not yet switched to the `variable` reusable stream** |
|
||||
| `YouTubeChatService.cs` | Polls `liveChat/messages`, raises `MessageReceived`; `IDisposable` |
|
||||
| `LayoutStore.cs` | SQLite persistence (`Microsoft.Data.Sqlite`) at `%APPDATA%\ytLlive\ytLlive.db`; assets stored as BLOBs keyed by SHA-256 content hash; save/open layout files |
|
||||
|
||||
Reference in New Issue
Block a user