The Web eID extension for the Chrome, Edge, Firefox and Opera web browsers is built using the WebExtensions API, a cross-browser system for developing extensions. The extension communicates with the Web eID native application using Native messaging. Native messaging enables an extension to exchange messages with a native application installed on the user's computer to enable the extension to access resources that are not accessible through WebExtension APIs, like the smart card subsystem.
-
Install the latest LTS version of Node.js - https://nodejs.org
-
Clone the project
git clone git@gitlab.com:web-eid/webextension/web-eid-webextension.git
-
Install dependencies
cd web-eid-webextension npm install
-
Build the project with zip packages
npm run clean build package
For reproducible builds, set the
SOURCE_DATE_EPOCH
environment variable.
See https://reproducible-builds.org/docs/source-date-epoch for details.SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) npm run clean build package
Alternatively, for reproducible builds, the
SOURCE_DATE_EPOCH
value can be taken from theSOURCE_DATE_EPOCH
file of a previous build.SOURCE_DATE_EPOCH=$(cat ../previous-build/dist/firefox/SOURCE_DATE_EPOCH) npm run clean build package
For backwards compatibility with TokenSigning API, set the
TOKEN_SIGNING_BACKWARDS_COMPATIBILITY
environment variable totrue
.TOKEN_SIGNING_BACKWARDS_COMPATIBILITY=true npm run clean build package
During development, for additional logging, set the
DEBUG
environment variable totrue
.DEBUG=true npm run clean build package
-
Load in Firefox as a Temporary Extension
- Open about:debugging#/runtime/this-firefox
- Click "Load temporary Add-on..." and open
/web-eid-webextension/dist/manifest.json
Make sure the NATIVE_APP_NAME
value in src/config.ts
matches the one in
the Web-eID native application manifest file.