bcgov / bc-wallet-mobile

BC Wallet to hold Verifiable Credentials
Apache License 2.0
60 stars 45 forks source link

On mobile, after sending information after a proof request, vc-authn does not receive or provide feedback of the information sent #1997

Open knguyenBC opened 3 months ago

knguyenBC commented 3 months ago

Description of problem

When a person attempts to access a service page on a mobile device using BC Wallet, they are able to successfully open the wallet via deeplink, receive a proof request and send the info over, however when they return to the service page, vc-authn does not provide any change to the interface. The page still displays the button "BC Wallet" in a pressed state.

Troubleshoot attempts:

Expected behavior

When the person returns to the service page after sharing information, vc-authn should display the correct message (either accepted, declined, not accepted etc.) and direct people through to the service (if accepted).

Steps to reproduce

Screenshots and/or log output

https://github.com/bcgov/bc-wallet-mobile/assets/68872187/6312bd94-1bec-4795-b57e-f30a37077bac

Environment

Build #: 1.0.16

Android Device Model:

iOS Device Model:

Workaround

none. use desktop?

Severity

loneil commented 3 months ago

Note that in any situations when going back to the app the BC Wallet button will be disabled and a pending message displayed. This is not deployed past VC-AuthN DEV yet though (can be seen here). Though that change should not affect ability for the verified case to go through described here.

loneil commented 3 months ago

This behaviour is working for me correctly consistently in any case I can try so far. (Need to try on an iPhone, but have used iPad)

Cases I am testing:

Above successful cases are working for me consistently on following cases

Android recording

https://github.com/bcgov/bc-wallet-mobile/assets/17445138/1add6d17-508d-41a6-9211-67109a7673a8

iPad recording

https://github.com/bcgov/bc-wallet-mobile/assets/17445138/c4f21019-4d9b-4290-9481-b8ff51391701

esune commented 2 months ago

It appears that the issue is with websockets being severed once the browser goes to the background (switch to wallet) and never re-established when the focus is regained (wallet back to browser). The issue seems to be more prominent with iOS.

Aiming to resolve this in https://github.com/bcgov/vc-authn-oidc/issues/548

loneil commented 2 months ago

I believe this is fixed in the next version of VCAuthN (currently in Dev environment). Tested out with Clecio on his iPhone a while back and was unable to get any failures.

knguyenBC commented 3 weeks ago

I tested production credentials and Courthouse libraries. iOS (iPhone SE) did not work Android (Pixel 8) worked https://github.com/bcgov/vc-authn-oidc/issues/548 did not resolve the issue for iOS it seems.

esune commented 2 weeks ago

Unless I am missing something, I think what @loneil did in https://github.com/bcgov/vc-authn-oidc/issues/548 is all we could do on our end (i.e.: all that can be done in the webapp to ensure websockets reconnect). We may have to look more in-depth at how app switching in iOS works and whether this is something we could solve in the mobile app code (maybe there's a way of specifying an app should not freeze for the specified interaction with another app?) or it is an issue that needs to be solved/supported at the OS level.