bcgov / bc-wallet-mobile

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

Update PIN screen lockout #2073

Open knguyenBC opened 1 month ago

knguyenBC commented 1 month ago

Background The current PIN screen features a modal that appears when the person is locked out of their app after 5 minutes of inactivity. This modal interferes with the biometrics login, making the UI clunky and if errors messages appear, it will freeze the app.

Updated design https://www.figma.com/design/mfUqAvZIeOsgxPqWTTp0SU/BC-Wallet-app?node-id=1531-5772&t=sMqtlLkRYUUmveAW-1

Given an existing BC Wallet user that has previously setup a PIN And has let their app idle for more than 5 minutes When they return to the BC Wallet app Then they are informed they have been locked out of the app because of inactivity And they can give their PIN again to regain access to the app

Note: If dev mode is enabled, add a dev mode setting to change the inactivity to Never, 1, 3, 5

Spike Goals:

nodlesh commented 1 month ago

May I suggest removing the references to screens and such and just reference behaviour. Your designs will give the screen details. So with that said, it might look something like this,

Given an existing BC Wallet user that has previously setup a PIN
And has let their app idle for more than 5 minutes
When they return to the BC Wallet app
Then they are informed they have been locked out of the app because of inactivity
And they can give their PIN again to regain access to the app

The Acceptance Criteria above is still true and can be verified, but it doesn't have to change for minor design, messaging, or even minor flow changes.

bryce-mcmath commented 1 month ago

Here's a potential solution: https://dev.to/gie3d/detect-user-idle-in-react-native-5fci

But it will need to be used in combination with our existing logic that checks for background time, as timeouts don't work properly when the app is backgrounded

knguyenBC commented 4 weeks ago

@bryce-mcmath Is this in testflight yet? I don't see the settings in dev mode and I tried testing and it didn't lock.

bryce-mcmath commented 4 weeks ago

@knguyenBC I understood this ticket to just be the spike

knguyenBC commented 4 weeks ago

Is the spike complete? Was it discussed with the team with next steps/new ticket(s) created?