summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-125-oauth2-client-switches.patch
blob: 6c7f56b56d966d615098e7de65406edc547e8aa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 6a84205d0399a94e8b526176a7dcafd6c2051a95 Mon Sep 17 00:00:00 2001
From: Matt Jolly <Matt.Jolly@footclan.ninja>
Date: Thu, 18 Apr 2024 21:15:20 +1000
Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials -
 125 update

125 moved the content to a new file.

Google doesn't let us bake in OAuth2 credentials, and for some time,
Google sign-in has been broken. Arch dealt with this in March, and so
did we to some degree, but in the last few months, our sign-in
credentials have been broken. It appears that we actually did remove API
credentials in March around Chrome 89, but they got added back, perhaps
when rotating newer versions to replace older versions. Work around this
by following Arch's lead: we remove the predefined credentials, as
before, but also we patch Chromium so that people can use their own
easily, using Arch's patch for that.

For more info, see:

https://archlinux.org/news/chromium-losing-sync-support-in-early-march/
https://bodhi.fedoraproject.org/updates/FEDORA-2021-48866282e5
https://hackaday.com/2021/01/26/whats-the-deal-with-chromium-on-linux-google-at-odds-with-package-maintainers/

Bug: https://bugs.gentoo.org/791871
Signed-off-by: Matt Jolly <kangie@gentoo.org>
--- a/google_apis/google_api_keys-inc.cc
+++ b/google_apis/google_api_keys-inc.cc
@@ -182,11 +182,11 @@ class APIKeyCache {
 
     std::string default_client_id = CalculateKeyValue(
         GOOGLE_DEFAULT_CLIENT_ID,
-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
         std::string(), environment.get(), command_line, gaia_config);
     std::string default_client_secret = CalculateKeyValue(
         GOOGLE_DEFAULT_CLIENT_SECRET,
-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
         std::string(), environment.get(), command_line, gaia_config);
 
     // We currently only allow overriding the baked-in values for the
-- 
2.44.0