FirebaseAuth Framework Reference

MultiFactor

@available(iOS 13, tvOS 13, macOS 10.15, watchOS 7, *)
@objc(FIRMultiFactor)
open class MultiFactor : NSObject
extension MultiFactor: NSSecureCoding

The interface defining the multi factor related properties and operations pertaining to a user.

This class is available on iOS only.

  • Undocumented

    Declaration

    Swift

    @objc
    open var enrolledFactors: [MultiFactorInfo]
  • Get a session for a second factor enrollment operation.

    This is used to identify the current user trying to enroll a second factor.

    Declaration

    Swift

    @objc(getSessionWithCompletion:)
    open func getSessionWithCompletion(_ completion: ((MultiFactorSession?, Error?) -> Void)?)

    Parameters

    completion

    A block with the session identifier for a second factor enrollment operation.

  • Get a session for a second factor enrollment operation.

    This is used to identify the current user trying to enroll a second factor.

    Declaration

    Swift

    @available(iOS 13, tvOS 13, macOS 10.15, watchOS 7, *)
    open func session() async throws -> MultiFactorSession
  • Enrolls a second factor as identified by the MultiFactorAssertion parameter for the current user.

    Declaration

    Swift

    @objc(enrollWithAssertion:displayName:completion:)
    open func enroll(with assertion: MultiFactorAssertion,
                     displayName: String?,
                     completion: ((Error?) -> Void)?)

    Parameters

    assertion
    displayName

    An optional display name associated with the multi factor to enroll.

    completion

    The block invoked when the request is complete, or fails.

  • Enrolls a second factor as identified by the MultiFactorAssertion parameter for the current user.

    Declaration

    Swift

    @available(iOS 13, tvOS 13, macOS 10.15, watchOS 7, *)
    open func enroll(with assertion: MultiFactorAssertion, displayName: String?) async throws

    Parameters

    assertion
    displayName

    An optional display name associated with the multi factor to enroll.

    completion

    The block invoked when the request is complete, or fails.

  • Unenroll the given multi factor.

    Declaration

    Swift

    @objc(unenrollWithInfo:completion:)
    open func unenroll(with factorInfo: MultiFactorInfo,
                       completion: ((Error?) -> Void)?)

    Parameters

    completion

    The block invoked when the request to send the verification email is complete, or fails.

  • Unenroll the given multi factor.

    Declaration

    Swift

    @available(iOS 13, tvOS 13, macOS 10.15, watchOS 7, *)
    open func unenroll(with factorInfo: MultiFactorInfo) async throws
  • Unenroll the given multi factor.

    Declaration

    Swift

    @objc(unenrollWithFactorUID:completion:)
    open func unenroll(withFactorUID factorUID: String,
                       completion: ((Error?) -> Void)?)

    Parameters

    completion

    The block invoked when the request to send the verification email is complete, or fails.

  • Unenroll the given multi factor.

    Declaration

    Swift

    @available(iOS 13, tvOS 13, macOS 10.15, watchOS 7, *)
    open func unenroll(withFactorUID factorUID: String) async throws
  • Undocumented

    Declaration

    Swift

    public static var supportsSecureCoding: Bool { get }
  • Undocumented

    Declaration

    Swift

    public func encode(with coder: NSCoder)
  • Undocumented

    Declaration

    Swift

    public required init?(coder: NSCoder)