Preserve chrome extension id during development

I'm trying to test a chrome extension on different machines and I've seen the extension ID change every time as I load it as an unpacked extension.

But I really need to maintain the same extension ID. My extension is distributed via OAuth 2.0 with an external provider other than Google. When I registered the extension with an external provider, I provided the redirect URI in the form chrome-extension://<extension-id>/callback.html

If I download the unpacked extension again, the ID changes and my app no ​​longer works with the redirect URI change. It is almost impossible to keep changing the redirect URI. How do I keep the same ID?

+3


source to share


1 answer


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

Here is the instruction to get the pem here: https://developer.chrome.com/extensions/packaging



And there is more details about the key field here: https://developer.chrome.com/extensions/manifest/key

Make sure you save the pem file after creating it! It can never be generated again and you will have to republish your application to get a new one.

+7


source







All Articles