[shotwell/shotwell-0.28] authenticator: Fix google and flickr authenticator



commit 720a43f82becda4a2f26ead30656b83f2d9dd2ac
Author: Jens Georg <mail jensge org>
Date:   Tue Nov 13 19:27:34 2018 +0100

    authenticator: Fix google and flickr authenticator
    
    There is probably an issue with webkit or how we are using webkit since
    the custom scheme is registered, but out call-back is not called.
    
    Fixes #80

 plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala | 3 ++-
 plugins/authenticator/shotwell/GoogleAuthenticator.vala           | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala 
b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
index 97629ed0..c26f89c3 100644
--- a/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
+++ b/plugins/authenticator/shotwell/FlickrPublishingAuthenticator.vala
@@ -55,7 +55,8 @@ namespace Publishing.Authenticator.Shotwell.Flickr {
         public override void on_page_load() {
             var uri = new Soup.URI(get_view().get_uri());
             if (uri.scheme == "shotwell-auth" && this.auth_code == null) {
-                this.error();
+                var form_data = Soup.Form.decode (uri.query);
+                this.auth_code = form_data.lookup("oauth_verifier");
             }
 
             if (this.auth_code != null) {
diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.vala 
b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
index f561197c..75d8f37f 100644
--- a/plugins/authenticator/shotwell/GoogleAuthenticator.vala
+++ b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
@@ -23,7 +23,8 @@ namespace Publishing.Authenticator.Shotwell.Google {
         public override void on_page_load() {
             var uri = new Soup.URI(get_view().get_uri());
             if (uri.scheme == REVERSE_CLIENT_ID && this.auth_code == null) {
-                this.error();
+                var form_data = Soup.Form.decode (uri.query);
+                this.auth_code = form_data.lookup("code");
             }
 
             if (this.auth_code != null) {


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