UnbluTwoFactorAuthWebViewProtocol
public 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
config
The
UnbluClientConfiguration
object used to configure the Unblu web view.uiConfig
The
UnbluTwoFactorAuthUIConfig
used to configure the error window’s button titles and colors.complete
A closure called upon completion. The first parameter is a
Bool
indicating success, and the second is an optionalString
containing an error message if any. -
Displays or presents the two-factor authentication view to the user.
Declaration
Swift
func showTwoFactorAuthenticationView(presentationStyle: UIModalPresentationStyle)
Parameters
presentationStyle
The
UIModalPresentationStyle
to 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.