Auto prompt biometric not shown when locking phone in app #1084

Closed
opened 2025-11-26 22:38:41 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @aaxdev on GitHub (Aug 19, 2020).

Describe the Bug

The biometric prompt is not shown when we lock the phone inside the app, example by the side button. Once the phone unlock, the app appear and the vault is locked but the biometric prompt is not shown and we need to trigger the biometric button manually.

Steps To Reproduce

  1. Open the app and unlock the vault.
  2. Set the option "vault timeout" on "Immediatly".
  3. Lock the phone by his side button when you're in app.
  4. Unlock the phone, the app should appear and the vault is locked as expected, but no biometric prompt is shown here.

Expected Result

The biometric prompt should be shown?

Actual Result

No biometric prompt shown, we need to trigger the biometric button manually to shown the prompt.

Environment

Android 10.

Code fix

On this line a535cea85f/src/App/App.xaml.cs (L418)
That condition set the variable autoPromptBiometric on false, by setting it on true or by removing that condition, the prompt is shown as expected. I can't understand why the variable is forced to be false here, also the condition for iOS doesn't cause issue, it seems to affect only on Android.

Originally created by @aaxdev on GitHub (Aug 19, 2020). ## Describe the Bug The biometric prompt is not shown when we lock the phone inside the app, example by the side button. Once the phone unlock, the app appear and the vault is locked but the biometric prompt is not shown and we need to trigger the biometric button manually. ## Steps To Reproduce 1. Open the app and unlock the vault. 2. Set the option "vault timeout" on "Immediatly". 3. Lock the phone by his side button when you're in app. 4. Unlock the phone, the app should appear and the vault is locked as expected, but no biometric prompt is shown here. ## Expected Result The biometric prompt should be shown? ## Actual Result No biometric prompt shown, we need to trigger the biometric button manually to shown the prompt. ## Environment Android 10. ## Code fix On this line https://github.com/bitwarden/mobile/blob/a535cea85f716b7d2d0d14e29d1301eea5485a6b/src/App/App.xaml.cs#L418 That condition set the variable autoPromptBiometric on false, by setting it on true or by removing that condition, the prompt is shown as expected. I can't understand why the variable is forced to be false here, also the condition for iOS doesn't cause issue, it seems to affect only on Android.
Author
Owner

@kspearrin commented on GitHub (Aug 19, 2020):

This is the expected functionality. If the user manually locks the app we don't expect that they want to immediately be prompted again to unlock it.

@kspearrin commented on GitHub (Aug 19, 2020): This is the expected functionality. If the user manually locks the app we don't expect that they want to immediately be prompted again to unlock it.
Author
Owner

@aaxdev commented on GitHub (Aug 19, 2020):

It's not about locking the app (vault), but the phone. Of course if we lock the app (vault) but not the phone, it's the expected behavior. But in the case the phone get locked by the side button of the phone when you're in the app, or itself due to the system lock timeout, once you unlock it you'll still be on the app and the vault has been locked (as expected), but here the prompt would be welcome to access to the vault quickly.

@aaxdev commented on GitHub (Aug 19, 2020): It's not about locking the app (vault), but the phone. Of course if we lock the app (vault) but not the phone, it's the expected behavior. But in the case the phone get locked by the side button of the phone when you're in the app, or itself due to the system lock timeout, once you unlock it you'll still be on the app and the vault has been locked (as expected), but here the prompt would be welcome to access to the vault quickly.
Author
Owner

@aaxdev commented on GitHub (Aug 19, 2020):

I just checked with iOS (Iphone 7), the bug don't seems to be there.

When you lock the phone by the side button when you're in your unlocked vault then you unlock back your phone, the app show the biometric prompt. It's not the case for Android.

@aaxdev commented on GitHub (Aug 19, 2020): I just checked with iOS (Iphone 7), the bug don't seems to be there. When you lock the phone by the side button when you're in your unlocked vault then you unlock back your phone, the app show the biometric prompt. It's not the case for Android.
Author
Owner

@clayadams5226 commented on GitHub (Dec 30, 2020):

Hi @aaxdev , it looks like there is a viable workaround or resolution for the issue you're experiencing. Please let us know if this resolves the originally posted issue.

@clayadams5226 commented on GitHub (Dec 30, 2020): Hi @aaxdev , it looks like there is a viable workaround or resolution for the issue you're experiencing. Please let us know if this resolves the originally posted issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#1084