[shotwell] youtube: Fix requested OAuth scope



commit 49d19930c4f2cafdcdeba30219f0b7859ea2f0eb
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 44009f87..2e2557c0 100644
--- a/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
+++ b/plugins/authenticator/shotwell/ShotwellAuthenticatorFactory.vala
@@ -27,7 +27,7 @@ namespace Publishing.Authenticator {
                 case "flickr":
                     return new Shotwell.Flickr.Flickr(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 9a8cffb4..91927bd0 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]