-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock profile when user leaves app on Ionic platform #1933
Conversation
Deployed to Cloudflare Pages
|
545c517
to
f0b9b23
Compare
6c5c594
to
8d98512
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1933 +/- ##
==========================================
- Coverage 80.82% 80.56% -0.27%
==========================================
Files 199 202 +3
Lines 5221 5247 +26
Branches 956 960 +4
==========================================
+ Hits 4220 4227 +7
- Misses 1001 1020 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
|
8d98512
to
9ce6eda
Compare
Solution
Current behavior of mobile platform(for that matter also web/extensions) does not lock the user profile, when leaving the app. Meaning the app would stay indefinitely unlocked, if user does not explicitly lock the wallet. This PR locks the wallet in 30sec of inactivity - but the implementation is not ideal. As timers get "frozen" when put in background, it uses a check upon activating the app, by comparing the timestamps before it went to sleep. Ideal solution would have a background service, with timer implemented - but would add an overhead of additional capacitor plugin.
In combination with hiding app information upon switching between apps(mobile), should be good enough solution.
Resources
For demo purposes, this used 5sec timer(instead of 30sec):
https://github.com/oasisprotocol/oasis-wallet-web/assets/9722540/ef1cb6d9-3cf0-4dac-8345-8fddd1bbdbdf