From 54951636d20fa798e148228118863b89a4580479 Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Sat, 12 Oct 2024 12:40:16 +1000 Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials - 131 update 131 moved a ton of things around; this is now in api_key_cache.cc 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 @@ -214,14 +214,14 @@ 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), std::string(), nullptr, + STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), std::string(), ::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), std::string(), - nullptr, std::string(), environment.get(), command_line, gaia_config, + ::switches::kOAuth2ClientSecret, std::string(), environment.get(), command_line, gaia_config, default_api_keys.allow_override_via_environment, default_api_keys.allow_unset_values); -- 2.46.2