FirebaseAuth Framework Reference

MultiFactor

class MultiFactor : NSObject

The interface defining the multi factor related properties and operations pertaining to a user. This class is available on iOS only.

  • Undocumented

    Declaration

    Swift

    var enrolledFactors: [MultiFactorInfo] { get }
  • Get a session for a second factor enrollment operation.

    Declaration

    Swift

    func session() async throws -> MultiFactorSession

    Parameters

    completion

    A block with the session identifier for a second factor enrollment operation. This is used to identify the current user trying to enroll a second factor.

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

    Declaration

    Swift

    func enroll(with assertion: MultiFactorAssertion, displayName: String?) async throws

    Parameters

    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

    func unenroll(with factorInfo: MultiFactorInfo) async throws

    Parameters

    completion

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

  • Unenroll the given multi factor.

    Declaration

    Swift

    func unenroll(withFactorUID factorUID: String) async throws

    Parameters

    completion

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