summaryrefslogtreecommitdiff
path: root/plugins/authenticator/shotwell/GoogleAuthenticator.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-08-15 09:42:50 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-08-15 09:42:50 +0200
commitbf92a282ab553ace71530391de33bdbf676a66bd (patch)
tree9166cc293d60df92084ef07232d89db30818f87f /plugins/authenticator/shotwell/GoogleAuthenticator.vala
parent6ff104c4ac1f934296b996458b15bea29f062323 (diff)
parentb57c8088c3dad237b04bb792c6dade9c470ce9fd (diff)
Update upstream source from tag 'upstream/0.30.5'
Update to upstream version '0.30.5' with Debian dir 414e83264d008ad44f5b2ae7107ff5acc3b3ea86
Diffstat (limited to 'plugins/authenticator/shotwell/GoogleAuthenticator.vala')
-rw-r--r--plugins/authenticator/shotwell/GoogleAuthenticator.vala11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/authenticator/shotwell/GoogleAuthenticator.vala b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
index 75d8f37..5b38ee6 100644
--- a/plugins/authenticator/shotwell/GoogleAuthenticator.vala
+++ b/plugins/authenticator/shotwell/GoogleAuthenticator.vala
@@ -21,6 +21,12 @@ namespace Publishing.Authenticator.Shotwell.Google {
}
public override void on_page_load() {
+ if (this.load_error != null) {
+ this.error ();
+
+ return;
+ }
+
var uri = new Soup.URI(get_view().get_uri());
if (uri.scheme == REVERSE_CLIENT_ID && this.auth_code == null) {
var form_data = Soup.Form.decode (uri.query);
@@ -173,6 +179,7 @@ namespace Publishing.Authenticator.Shotwell.Google {
web_auth_pane = new WebAuthenticationPane(user_authorization_url);
web_auth_pane.authorized.connect(on_web_auth_pane_authorized);
+ web_auth_pane.error.connect(on_web_auth_pane_error);
host.install_dialog_pane(web_auth_pane);
}
@@ -185,6 +192,10 @@ namespace Publishing.Authenticator.Shotwell.Google {
do_get_access_tokens(auth_code);
}
+ private void on_web_auth_pane_error() {
+ host.post_error(web_auth_pane.load_error);
+ }
+
private void do_get_access_tokens(string auth_code) {
debug("ACTION: exchanging authorization code for access & refresh tokens");