You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.7 KiB
47 lines
1.7 KiB
1 year ago
|
From 7fa904c3240b16929c7262912b750d48536d07bf Mon Sep 17 00:00:00 2001
|
||
|
From: Alexey Berezhok <alexey.berezhok@softline.com>
|
||
|
Date: Tue, 19 Sep 2023 17:37:54 +0300
|
||
|
Subject: [PATCH] Fix bug when yandex account added not through goa
|
||
|
|
||
|
---
|
||
|
src/libedataserver/e-oauth2-service-yandex.c | 9 ++++++++-
|
||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/libedataserver/e-oauth2-service-yandex.c b/src/libedataserver/e-oauth2-service-yandex.c
|
||
|
index 64ac387..492c826 100644
|
||
|
--- a/src/libedataserver/e-oauth2-service-yandex.c
|
||
|
+++ b/src/libedataserver/e-oauth2-service-yandex.c
|
||
|
@@ -127,6 +127,13 @@ eos_yandex_get_refresh_uri (EOAuth2Service *service,
|
||
|
return "https://oauth.yandex.ru/token";
|
||
|
}
|
||
|
|
||
|
+static const gchar *
|
||
|
+eos_yandex_get_redirect_uri (EOAuth2Service *service,
|
||
|
+ ESource *source)
|
||
|
+{
|
||
|
+ return "http://localhost";
|
||
|
+}
|
||
|
+
|
||
|
static void
|
||
|
eos_yandex_prepare_authentication_uri_query (EOAuth2Service *service,
|
||
|
ESource *source,
|
||
|
@@ -139,7 +146,6 @@ eos_yandex_prepare_authentication_uri_query (EOAuth2Service *service,
|
||
|
g_return_if_fail (uri_query != NULL);
|
||
|
|
||
|
e_oauth2_service_util_set_to_form (uri_query, "scope", YANDEX_SCOPE);
|
||
|
- e_oauth2_service_util_set_to_form (uri_query, "include_granted_scopes", "false");
|
||
|
}
|
||
|
|
||
|
static gboolean
|
||
|
@@ -199,6 +205,7 @@ e_oauth2_service_yandex_oauth2_service_init (EOAuth2ServiceInterface *iface)
|
||
|
iface->get_client_secret = eos_yandex_get_client_secret;
|
||
|
iface->get_authentication_uri = eos_yandex_get_authentication_uri;
|
||
|
iface->get_refresh_uri = eos_yandex_get_refresh_uri;
|
||
|
+ iface->get_redirect_uri = eos_yandex_get_redirect_uri;
|
||
|
iface->prepare_authentication_uri_query = eos_yandex_prepare_authentication_uri_query;
|
||
|
iface->extract_authorization_code = eos_yandex_extract_authorization_code;
|
||
|
}
|
||
|
--
|
||
|
2.39.1
|
||
|
|