MFARequestChallengeDelegate
@objc
public protocol MFARequestChallengeDelegate
Protocol that defines the methods of a MFARequestChallenge delegate
-
Notifies the delegate that the operation resulted in an error.
Declaration
Swift
@MainActor func onMFARequestChallengeError(error: MFARequestChallengeError, newState: MFARequiredState?)Parameters
errorAn error object indicating why the operation failed.
newStateAn object representing the new state of the flow with follow on methods.
-
Notifies the delegate that a verification is required from the user to continue.
Note
If a flow requires this optional method and it is not implemented, thenonMFARequestChallengeError(error:)will be called.Declaration
Swift
@MainActor @objc optional func onMFARequestChallengeVerificationRequired( newState: MFARequiredState, sentTo: String, channelTargetType: MSALNativeAuthChannelType, codeLength: Int)Parameters
newStateAn object representing the new state of the flow with follow on methods.
sentToThe email/phone number that the code was sent to.
channelTargetTypeThe channel (email/phone) the code was sent through.
codeLengthThe length of the code required.
-
Notifies the delegate that the list of authentication methods is now available. The user is required to choose an authentication method and then proceed with the “newState” to advance in the MFA process.
Note
If a flow requires this optional method and it is not implemented, thenonMFARequestChallengeError(error:)will be called.Declaration
Swift
@MainActor @objc optional func onMFARequestChallengeSelectionRequired(authMethods: [MSALAuthMethod], newState: MFARequiredState)Parameters
authMethodslist of authentication method
newStateAn object representing the new state of the flow with follow on methods.
View on GitHub