FirebaseAuth Framework Reference

MultiFactor

@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRMultiFactor)openclassMultiFactor:NSObject
extensionMultiFactor:NSSecureCoding

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

This class is available on iOS and macOS.

  • Undocumented

    Declaration

    Swift

    @objcopenvarenrolledFactors:[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:)openfuncgetSessionWithCompletion(_completion:((MultiFactorSession?,Error?)->Void)?)

    Parameters

    completion

    A block with the session identifier for a second factor enrollmentoperation.

  • 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(iOS13,tvOS13,macOS10.15,watchOS7,*)openfuncsession()asyncthrows->MultiFactorSession
  • Enrolls a second factor as identified by theMultiFactorAssertion parameter for thecurrent user.

    Declaration

    Swift

    @objc(enrollWithAssertion:displayName:completion:)openfuncenroll(withassertion:MultiFactorAssertion,displayName:String?,completion:((Error?)->Void)?)

    Parameters

    assertion
    displayName

    An optional display name associated with the multi factor toenroll.

    completion

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

  • Enrolls a second factor as identified by theMultiFactorAssertion parameter for thecurrent user.

    Declaration

    Swift

    @available(iOS13,tvOS13,macOS10.15,watchOS7,*)openfuncenroll(withassertion:MultiFactorAssertion,displayName:String?)asyncthrows

    Parameters

    assertion
    displayName

    An optional display name associated with the multi factor toenroll.

  • Unenroll the given multi factor.

    Declaration

    Swift

    @objc(unenrollWithInfo:completion:)openfuncunenroll(withfactorInfo:MultiFactorInfo,completion:((Error?)->Void)?)

    Parameters

    factorInfo

    The second factor instance to unenroll.

    completion

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

  • Unenroll the given multi factor.

    Declaration

    Swift

    @available(iOS13,tvOS13,macOS10.15,watchOS7,*)openfuncunenroll(withfactorInfo:MultiFactorInfo)asyncthrows
  • Unenroll the given multi factor.

    Declaration

    Swift

    @objc(unenrollWithFactorUID:completion:)openfuncunenroll(withFactorUIDfactorUID:String,completion:((Error?)->Void)?)

    Parameters

    factorUID

    The unique identifier corresponding to thesecond factor being unenrolled.

    completion

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

  • Unenroll the given multi factor.

    Declaration

    Swift

    @available(iOS13,tvOS13,macOS10.15,watchOS7,*)openfuncunenroll(withFactorUIDfactorUID:String)asyncthrows
  • Undocumented

    Declaration

    Swift

    publicstaticletsupportsSecureCoding:Bool
  • Undocumented

    Declaration

    Swift

    publicfuncencode(withcoder:NSCoder)
  • Undocumented

    Declaration

    Swift

    publicrequiredinit?(coder:NSCoder)

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-27 UTC.