Skip to content

Commit

Permalink
UI: Implement DeleteCookies for YT Service dock
Browse files Browse the repository at this point in the history
This will enable centralized cookie management for YouTube/Google
account logins for other browser docks using the shared cookie manager.
  • Loading branch information
msuman-google committed May 29, 2024
1 parent e92010c commit 7ffed41
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion UI/auth-youtube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ static inline void OpenBrowser(const QString auth_uri)
QDesktopServices::openUrl(url);
}

static void DeleteCookies()
{
if (panel_cookies) {
panel_cookies->DeleteCookies("youtube.com", std::string());
panel_cookies->DeleteCookies("google.com", std::string());
}
}

void RegisterYoutubeAuth()
{
for (auto &service : youtubeServices) {
Expand All @@ -64,7 +72,7 @@ void RegisterYoutubeAuth()
return std::make_shared<YoutubeApiWrappers>(
service);
},
YoutubeAuth::Login, []() { return; });
YoutubeAuth::Login, DeleteCookies);
}
}

Expand Down

0 comments on commit 7ffed41

Please sign in to comment.