Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep chrome extension id same during development [duplicate]

I am trying to test my chrome extension on different machines, and I saw that the extension id changes every time since I am loading it as an unpacked extension.

But, I really need to maintain the same extension id. My extension goes through OAuth 2.0 with an external non-Google provider. When I registered my extension with the external provider, I had provided the redirect URI in the form of chrome-extension://<extension-id>/callback.html If I load the unpacked extension again, the id changes and my app no longer works as the redirect URI changes. It's practically unfeasible to keep changing the redirect URI. How do I maintain the same id?

like image 425
llams48 Avatar asked Jul 15 '15 05:07

llams48


People also ask

Does an extension ID change?

Once uploaded to the Chrome Web Store, your extension ID is fixed and cannot be changed any more. The ID is derived from the .

Do extensions sync across devices?

How to get chrome extensions automatically installed and sync on all your devices. When you turn on Google Chrome browser sync, then all your chrome extensions will be automatically installed on all your devices. Also, the settings and state for all these extensions will be the same on all your devices.


1 Answers

You need to set the key in the manifest file, based on your generated pem file.

There's instruction on getting the pem here: https://developer.chrome.com/extensions/packaging

And there's more detail on the key field here: https://developer.chrome.com/extensions/manifest/key

Make sure you save your pem file once you generate it! It can never be generated again, and you'll have to republish your app to get a new one.

like image 122
Brian Avatar answered Oct 26 '22 15:10

Brian