-
Notifications
You must be signed in to change notification settings - Fork 982
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
Link v3: Add support for 2FA Modal and FlowController #4227
base: relink/passthrough
Are you sure you want to change the base?
Conversation
if configuration.forceEnableNativeLink && | ||
self.supportsLink && | ||
linkAccount.sessionState == .requiresVerification && | ||
!linkAccount.hasStartedSMSVerification && | ||
self.linkSettings?.suppress2FAModal != true { | ||
return true | ||
} | ||
return false |
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.
can remove if
and just return
return configuration.forceEnableNativeLink && ...
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.
🤦 Thanks!
let keyWindow = UIApplication.shared.windows.first(where: { $0.isKeyWindow }), | ||
let presentedViewController = keyWindow.findTopMostPresentedViewController() | ||
else { | ||
assertionFailure("No key window with view controller found") |
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.
stpAssertionFailure
verificationController.present(from: self.bottomSheetViewController) { result in | ||
switch result { | ||
case .completed: | ||
self.presentPayWithNativeLinkController(from: self.bottomSheetViewController, intent: loadResult.intent, elementsSession: loadResult.elementsSession, shouldOfferApplePay: true, shouldFinishOnClose: false) { |
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.
i would have expected shouldOfferApplePay to come from our configuration?
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.
Ah yes, good catch!
Summary
Motivation
Enabling FlowController in Link v3.
Testing
PaymentSheet Example, will add end-to-end tests
Changelog
None yet