Fix: deeplinks handling when lock method is enabled #1034
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to reproduce the error:
iOS:
Enable the PIN/Biometric lock method:
Proposed solution: Wait for the lock modal to be successfully dismissed before performing the navigation.
It has been minimized more than 20 seconds ago since the last unlock (
lockAuthorizedUntil
). So when you click on a deeplink, you return to the app, it shows the lock modal and a case similar to the previous one happens, in which a race occurs between the lock modal and the link navigation.It has been minimized after the selected lock method has been successfully dismissed, and the deeplink has been clicked within 20 seconds (lockAuthorizedUntil), so the lock modal should not be displayed and only navigation should be performed.
The app has been minimized with the lock modal already open. In this case the lock modal should continue to be shown and wait for it to be correctly dismissed to continue with the link
Proposed solution: Control the
lockAuthorizedUntil
variable, to verify whether the time has been met or not. If the time is not met, the deeplink navigation is carried out normally. If the time has already passed or the modal was previously open, wait for the lock modal to be successfully dismissed before performing the navigation.Android:
After some testing, it seems to work correctly, so no changes are necessary here.