bcgov / vc-authn-oidc

Apache License 2.0
143 stars 74 forks source link

Reconnect websockets after app switch #548

Closed esune closed 3 months ago

esune commented 3 months ago

When going through the same-device access experience, the browser is sent to background for the time necessary to the user to interact with BC Wallet. This seems to cause websockets (and potentially polling) to be terminated.

Using the focus browser window event we may be able to reconnect the client so that the UI can refresh - see https://developer.mozilla.org/en-US/docs/Web/API/Window/focus_event

loneil commented 3 months ago

Have tested this out in Dev environment after these changes on Clecio's iPhone while watching browser logs. Was working for shared and declined proofs successfully on BCNGN and cell network. So tentatively declaring this one cleared.