privacybydesign / irma-frontend-packages

Collection of frontend related packages, that together form a Javascript "client" to the IRMA server.
7 stars 4 forks source link

Integrate browser fallback functionality to prevent the IRMA app failing to open #39

Closed snevas closed 3 years ago

snevas commented 3 years ago

When trying to load attributes e.g. with DigiD with a alternate default browser set, you could end up with a redirect to the app store webpage. This is because e.g. Firefox does not open app-links by default (privacy measure), which triggers the redirect. This could be solved within the app (WebView), or within the Gemeente Nijmegen-flow.

Version app: 6.0.11 Alternate default browser: Firefox Mobile Android 10

Steps:

ivard commented 3 years ago

Yeah we know about this inconvenience. We cannot solve it in the webview either, since we use custom tabs (which is just the normal browser version with some theming). Webviews are not properly implemented yet in Flutter. I'd still want to convert the links on websites from web links (universal links) to direct app links without a browser fallback. The only thing we have to solve for this is adding some handling for users that don't have the IRMA app yet. Of course they cannot click on direct app links if they haven't installed the app.

For now you can solve this by enabling 'Open links in apps' feature of Firefox. You can find this in the FAQ at 'A link to the IRMA app on a webpage does not open, for receiving or disclosing a card. What now?'.

So it is on our list, but it is a bit more work than you might expect :)

snevas commented 3 years ago

Okay, but what if you would not do a automatic redirect to the appstore in the Nijmegen-flow, but make a landing page with 2 buttons:

This is also how other parties like ABN-amro handle this with payment links.

You end up with a sitation where for 90% of people it would still work as before and the other 10% would end up in this landing page where you could still load the attibute without changing browser settings.

ivard commented 3 years ago

We actually do so. Some issuers however still use an older version of our library, so that's why it is not visible there. For example if you try the AngryGames demo you'll see that we don't do automatic redirects anymore.

The only thing indeed that we still have to add to the irma-frontend-packages (it's on my wish list for some time) that users get the option to install the IRMA app if they haven't done that already. That view in the UX is still missing there. The IRMA app perfectly supports this scenario, so here we don't need extra functionality. I'll therefore move this issue to there.

snevas commented 3 years ago

The loading of attibutes functionality (https://services.nijmegen.nl/irma/gemeente/start) works the same from the AngryGames demo.

The the age check has a new/other issue: If I click open app, and approve giving the age proof, I get back to the irma.app-site, but it does not forward me to a passed-page. Should I open another issue for this?

ivard commented 3 years ago

If it really contains a bug in the demo itself, then you can indeed better make an issue in Angrygames itself. I tested it myself and I don't have any problems, so I'm curious to the bug report to reproduce then. In the Firefox Android app you should enable the setting to open links in other apps (Settings -> enable 'Open links in apps'), to circumvent this current issue of irma-frontend-packages.