summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-134-oauth2-client-switches.patch
blob: b7137e524809dce825ceb6d64383fe546ecbcec4 (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
From 628c8aad603791ec1276c6a5b8d3704a03840f86 Mon Sep 17 00:00:00 2001
From: Matt Jolly <kangie@gentoo.org>
Date: Sat, 18 Jan 2025 11:09:46 +1000
Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials

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.
--- a/google_apis/api_key_cache.cc
+++ b/google_apis/api_key_cache.cc
@@ -192,13 +192,13 @@ ApiKeyCache::ApiKeyCache(const DefaultApiKeys& default_api_keys) {
 
   std::string default_client_id = CalculateKeyValue(
       default_api_keys.google_default_client_id,
-      STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr, std::string(),
+      STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID, std::string(),
       environment.get(), command_line, gaia_config,
       default_api_keys.allow_override_via_environment,
       default_api_keys.allow_unset_values);
   std::string default_client_secret = CalculateKeyValue(
       default_api_keys.google_default_client_secret,
-      STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
+      STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientID,
       std::string(), environment.get(), command_line, gaia_config,
       default_api_keys.allow_override_via_environment,
       default_api_keys.allow_unset_values);
-- 
2.48.0