Releases: privacybydesign/irma-frontend-packages
v0.4.3
This is a patch release containing some bug fixes and an upgrade of deprecated dependency versions.
Below, you can find a changelog. Packages that are not mentioned did not change.
irma-web
and irma-popup
Fixed
- Use static
require
statements for browserify bundler
irma-client
Fixed
- Explicitly disable caching of network responses during status polling
irma-frontend
Changed
- Upgraded to webpack 5
Fixed
- Added missing polyfills for IE11
Note: Microsoft will fully deprecate Internet Explorer in June 2022, so then we'll drop the support for this browser.
v0.4.2
This is a patch release containing a bug fix and some README improvements.
Below, you can find a changelog. Packages that are not mentioned did not change.
irma-frontend
Fixed
- HTTP error responses received from the result endpoint (during
irma-core
statePreparingResult
) are now handled properly, preventing a loading screen to be infinitely visible.
irma-client
Changed
- Improved the README
Fixed
- HTTP error responses received from the result endpoint (during
irma-core
statePreparingResult
) are now handled properly, preventing a loading screen to be infinitely visible.
Device pairing and chained sessions
In this release, we introduce support for device pairing that can be enabled to prevent QR theft. When enabling this feature, an extra state is added between scanning a IRMA QR code and actually performing the session. In this state, a pairing code is visible in the IRMA app. The user should enter that pairing code in the frontend to continue.
For the following session types it is important that the right user scans the QR, since the session might contain sensitive information.
- Issuing sessions
- Disclosing sessions with fixed attribute values (e.g. show that your email address is [email protected])
- Signing sessions (the message that needs signing might contain sensitive information)
Furthermore, this release includes frontend support for chained sessions.
In order to use device pairing and chained sessions, your IRMA server should have version 0.8.0 or higher.
Global API changes
The changes below concern changes in behaviour of the exported methods of irma-core
and irma-frontend
.
Added
- Support for IRMA server version 0.8.0.
- New mapping
frontendRequest
within thesession
options ofirma-client
to deal withfrontendRequest
tokens received from the/session
endpoint of the IRMA server. - New
frontendOptions
andpairing
configuration within thestate
options ofirma-client
to set the desired pairing behaviour and to configure the endpoints of the IRMA server API related to pairing. - In the
state
options ofirma-client
, the optionsurl
andlegacyUrl
have been added. With these options you can define a template how to build URLs to reach respectively the IRMA server's frontend endpoints and the IRMA server's legacy endpoints for status updates.
Changed
- When your custom plugin returns a value in its
close()
method, thestart()
method ofirma-core
now includes this value in the result on resolve. The exact format of this result can be found here. On Promise rejection, the error value remains unchanged. - The
abort()
method returns a Promise now to indicate when aborting is being processed by the state machine. The plugins may take some extra time to close down, so the Promise fromstart()
and the Promise fromabort()
may not resolve at the same time. - For the
state
optionsserverSentEvents
andpolling
ofirma-client
, theurl
option has been replaced byendpoint
. The newurl
andlegacyUrl
options (see above) are used to actually build the URL.
Changes in individual packages
The changes mentioned below are specific changes within individual packages. Changes in the API that concern the functioning of the irma-frontend-packages
as a whole can be found in the global API changes section.
irma-core
These changes are relevant for developers of custom plugins.
Added
- New states
EnterPairingCode
andPairing
in the state machine for the new pairing phase. - New states
PreparingQRCode
andPreparingIrmaButton
to enableirma-client
to correctly configure pairing at the IRMA server. - New state
PreparingResult
to be able to display a loading indicator when the session result is being fetched. - There is a new method
selectTransition
in the state machine to select the transition you want the state machine to do.
Changed
- The state
MediumContemplation
has been renamed toCheckingUserAgent
, because the responsibility for converting thesessionPtr
has been delegated toirma-client
/irma-dummy
. In the previous implementationirma-core
itself was responsible for the transitions in theMediumContemplation
state, which was not very clean. - The previous states
ShowingQRCode
andShowingQRCodeInstead
are now merged in one stateShowingQRCode
. - The
close()
method of a custom plugin does not necessarily have to return a Promise anymore. - The deprecated
transition
andfinalTransition
methods (see below) of the state machine return Promises now. This means they are not blocking anymore; you have to explicitly wait for completion. In this way, we can guarantee that the order of state changes is the same for all plugins. - When initiating an invalid transition, there is no implicit fallback to
fail
anymore when the transition is invalid. As developer, you are now responsible yourself to select an alternative. This gives more control over the behaviour of the state machine.
Deprecated
- The
transition
andfinalTransition
methods of theirma-core
state machine are deprecated. Please useselectTransition
instead.
Removed
- We fixed the bug that we sometimes miss the
appConnected
transition inirma-client
, so we removed thesucceed
transition from theShowingQRCode
andShowingIrmaButton
states now. This transition was only there to deal with this bug. - Because of the changed behaviour that there is no implicit fallback to
fail
anymore, we removed the possibility to initiate afail
transition from theUninitialized
state. This transition became superfluous. - The
getState
,isValidTransition
andisEndState
methods of the state machine are removed. Their return value is not reliable for the selection of a desired transition anymore. You can useselectTransition
instead. Below you can find some examples as a guide for refactoring your custom plugin.
// Old
if (this._stateMachine.getState() == 'Uninitialized') this._stateMachine.transition('initialize');
// New
this._stateMachine.selectTransition(
({state}) => state == 'Uninitialized' ? { transition: 'initialize' } : false
);
// Old
if (this._stateMachine.isValidTransition('fail')) this._stateMachine.transition('fail');
// New
this._stateMachine.selectTransition(
({validTransitions}) => validTransitions.includes('fail') ? { transition: 'fail' } : false
);
// Old
if (!this._stateMachine.isEndState()) this._stateMachine.transition('abort');
// New
this._stateMachine.selectTransition(
({inEndState}) => inEndState ? false : { transition: 'abort' }
);
Fixed
- The order of state changes was not always correct when initiating a new transition from within
stateChange
.
irma-css
Added
- Styling for the new state
EnterPairingCode
.
Changed
- Loading indicator has been restyled to prevent graphical artifacts in Google Chrome.
- Buttons have rounded corners now.
- On all sides, the border of the body of an
irma-form
has rounded corners now.
irma-client
Added
- This plugin now initiates the
prepareQRCode
or theprepareButton
transition within theCheckingUserAgent
state. Checking the user agent was done byirma-core
first, but has been delegated to this plugin now.
Changed
- The plugin has been updated to deal with the updated
irma-core
state machine.
Fixed
- Bug that
succeed
transition (nowprepareResult
transition) could already be initiated in theShowingQRCode
andShowingIrmaButton
state.
irma-console
Added
- Support for entering pairing codes (the
EnterPairingCode
state)
Changed
- The plugin has been updated to deal with the updated
irma-core
state machine.
Fixed
- Plugin now triggers an error when the state gets changed to
ShowingIrmaButton
. This state should not happen when usingirma-console
, since this can only occur on mobile.
irma-web
Added
- Support for entering pairing codes (the
EnterPairingCode
state)
Changed
- The plugin has been updated to deal with the updated
irma-core
state machine. - Being in the
Aborted
state is mentioned in HTML comments (as already was the case for all other states). - In the default locales for Dutch (
nl
), the lineEén moment alsjeblieft
has been replaced byEen moment alstublieft
andOpen IRMA app
is replaced byOpen IRMA-app
.
irma-popup
On top of the changes mentioned below, the changes in irma-web
also apply to this package.
Fixed
- The pop-up could loose focus, making it possible to control the underlying web page using your keyboard.
- The
close()
method of...
Firefox for Android fix
This release resolves issues when starting an IRMA session from Firefox for Android. Instead of the IRMA app being started, a fallback website was opened. Users could only circumvent this behaviour by actively enabling the ‘Open links in apps’ option in the Firefox app. With this fix, it works with the default Firefox settings again.
We removed the fallback website from the URL to make sure Firefox has no other option but opening the IRMA app. Instead, we now use the build-in Android support to open the Google Play Store if the IRMA app isn’t installed yet. As fallback, we activate the integrated helper in case the Play Store cannot open (see below).
The helper is opened with some delay, and hidden again when the flow continues, to make sure regular users won’t see it. Both the opening delay and the helper text are configurable.
In irma-client
, we also fixed that polling the IRMA server for status changes sometimes fails when switching from Firefox to the IRMA app and vice versa.
Changelog
Below you can find the changelog per package.
irma-core
Fixed
- When IRMA isn't installed yet, use the build-in Android support to open the Google Play Store instead of using fallback URLs
irma-web
Added
- Display a fallback message when the Google Play Store could not be opened
- Added a
fallbackDelay
option for the fallback message
Changed
- Improved the helper text
irma-client
Fixed
- Polling sometimes failed on Firefox for Android when switching to the IRMA app
irma-popup
Check the changelog of irma-web
for all changes.
irma-frontend
Check the changelog of irma-core
, irma-web
and irma-client
for all changes.
Initial combined release
In this release, we introduce uniform versioning of the irma-frontend-packages
. Before this release, all packages had independent version numbers. For clarity and communication purposes, all packages that belong together will have the same version number from now on. In this way, it is more clear which packages can be combined when using multiple irma-frontend-packages
together.
This release does not contain any new features and is a re-release of the following versions:
irma-core
version0.1.4
irma-web
version0.1.2
irma-popup
version0.1.3
irma-client
version0.1.4
irma-dummy
version0.1.1
irma-console
version0.1.1
irma-css
version0.3.1
irma-frontend
version0.1.5
When using the versions above, it is fully save to upgrade to version 0.3.2
without any compatibility issues.