Skip to content

Instantly share code, notes, and snippets.

@foutrelis
Last active April 4, 2024 22:58
Show Gist options
  • Star 55 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save foutrelis/14e339596b89813aa9c37fd1b4e5d9d5 to your computer and use it in GitHub Desktop.
Save foutrelis/14e339596b89813aa9c37fd1b4e5d9d5 to your computer and use it in GitHub Desktop.
===================================================================
Google doesn't allow using Chrome's API keys in Chromium builds and
strongly recommends against doing so. These OAuth 2 credentials are
taken from publicly available sources, but their fitness for use in
Chromium builds is not warrantied.
===================================================================
!!! Use these keys to reactivate Sync in Chromium at your own risk;
they are extremely likely to stop working in the (near) future.
$ grep oauth2 ~/.config/chromium-flags.conf
--oauth2-client-id=77185425430.apps.googleusercontent.com
--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT
Note: The above works on Arch Linux because of its custom launcher,
plus a patch to reuse --oauth2-client-{id,secret} for setting
GOOGLE_DEFAULT_CLIENT_{ID,SECRET} similar to environment vars.
https://wiki.archlinux.org/index.php/Chromium#Making_flags_persistent
@Magma5
Copy link

Magma5 commented Apr 4, 2024

Add these into the LSEnvironment section in Chromium.app/Contents/Info.plist before launching for the first time:

	<key>LSEnvironment</key>
	<dict>
		<key>MallocNanoZone</key>
		<string>0</string>
		<key>GOOGLE_DEFAULT_CLIENT_ID</key>
		<string>...</string>
		<key>GOOGLE_DEFAULT_CLIENT_SECRET</key>
		<string>...</string>
		<key>GOOGLE_API_KEY</key>
		<string></string>
	</dict>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment