UnbluTwoFactorAuthWebViewProtocol
protocol UnbluTwoFactorAuthWebViewProtocol
A protocol that defines the interface for an Unblu two-factor authentication (2FA) web view.
-
Initializes the 2FA web view with the specified configuration.
Declaration
Swift
init(withConfiguration config: UnbluClientConfiguration, uiConfig: UnbluTwoFactorAuthErrorUIConfig, _ complete: @escaping (Bool, String?) -> Void)Parameters
uiConfigThe
UnbluTwoFactorAuthUIConfigused to configure the error window’s button titles and colors.completeA closure called upon completion. The first parameter is a
Boolindicating success, and the second is an optionalStringcontaining an error message if any. -
Displays or presents the two-factor authentication view to the user.
Declaration
Swift
func showTwoFactorAuthenticationView(presentationStyle: UIModalPresentationStyle)Parameters
presentationStyleThe
UIModalPresentationStyleto use when presenting the view (e.g.,.pageSheet,.formSheet,.overCurrentContext, etc.). This method is intended to trigger the presentation of the 2FA interface, ensuring that the user can interact with the two-factor authentication process.