[shotwell/shotwell-0.30] youtube: Fix requested OAuth scope



commit 68fa7051eea6bf25656e4988fb8635375cbf4081
Author: Jens Georg <mail jensge org>
Date:   Fri May 1 08:09:52 2020 +0200

    youtube: Fix requested OAuth scope

 plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala | 2 +-
 plugins/shotwell-publishing/YouTubePublishing.vala               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala 
b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
index 36fb2902..1d861415 100644
--- a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
+++ b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
@@ -29,7 +29,7 @@ namespace Publishing.Authenticator {
                 case "facebook":
                     return new Shotwell.Facebook.Facebook(host);
                 case "youtube":
-                    return new Shotwell.Google.Google("https://gdata.youtube.com/";, _("You are not currently 
logged into YouTube.\n\nYou must have already signed up for a Google account and set it up for use with 
YouTube to continue. You can set up most accounts by using your browser to log into the YouTube site at least 
once."), host);
+                    return new Shotwell.Google.Google("https://www.googleapis.com/auth/youtube";, _("You are 
not currently logged into YouTube.\n\nYou must have already signed up for a Google account and set it up for 
use with YouTube to continue. You can set up most accounts by using your browser to log into the YouTube site 
at least once."), host);
                 case "tumblr":
                     return new Shotwell.Tumblr.Tumblr(host);
                 case "google-photos":
diff --git a/plugins/shotwell-publishing/YouTubePublishing.vala 
b/plugins/shotwell-publishing/YouTubePublishing.vala
index 87f19599..e50d17a3 100644
--- a/plugins/shotwell-publishing/YouTubePublishing.vala
+++ b/plugins/shotwell-publishing/YouTubePublishing.vala
@@ -99,7 +99,7 @@ internal class YouTubeAuthorizer : GData.Authorizer, Object {
     }
 
     public bool is_authorized_for_domain(GData.AuthorizationDomain domain) {
-        return true;
+        return domain.scope.has_suffix ("auth/youtube");
     }
 
     public void process_request(GData.AuthorizationDomain? domain,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]