-
Notifications
You must be signed in to change notification settings - Fork 53
[PM-10450] Fix FIdo2 never lock user verification not appearing #787
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import AuthenticationServices | |
import BitwardenSdk | ||
import Combine | ||
import Foundation | ||
import OSLog | ||
import UIKit | ||
|
||
/// The `AppProcessor` processes actions received at the application level and contains the logic | ||
|
@@ -423,11 +424,23 @@ extension AppProcessor: Fido2UserInterfaceHelperDelegate { | |
} | ||
|
||
func onNeedsUserInteraction() async throws { | ||
if let fido2AppExtensionDelegate = appExtensionDelegate as? Fido2AppExtensionDelegate, | ||
!fido2AppExtensionDelegate.flowWithUserInteraction { | ||
guard let fido2AppExtensionDelegate = appExtensionDelegate as? Fido2AppExtensionDelegate else { | ||
return | ||
} | ||
|
||
if !fido2AppExtensionDelegate.flowWithUserInteraction { | ||
fido2AppExtensionDelegate.setUserInteractionRequired() | ||
throw Fido2Error.userInteractionRequired | ||
} | ||
|
||
// WORKAROUND: We need to wait until the view controller appears in order to perform any | ||
// action that needs user interaction or it might not show the prompt to the user. | ||
// E.g. without this there are certain devices that don't show the FaceID prompt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⛏️ "E.g." means "for example" ("exempli gratia"); if you want "that is" or "in other words", that'd be "i.e." ("id est") There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted exampli gratia, as there are other cases in which this happens as setting up the PIN. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, wasn't sure! |
||
// and the user only sees the screen dimming a bit and failing the flow. | ||
Comment on lines
+436
to
+439
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
for await didAppear in fido2AppExtensionDelegate.getDidAppearPublisher() { | ||
guard didAppear else { continue } | ||
return | ||
} | ||
} | ||
|
||
func showAlert(_ alert: Alert) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ If we don't have logs in the file we shouldn't have this