FirebaseAuth Framework Reference Stay organized with collections Save and categorize content based on your preferences.
MultiFactor
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)@objc(FIRMultiFactor)openclassMultiFactor:NSObjectextensionMultiFactor:NSSecureCodingThe 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
completionA 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->MultiFactorSessionEnrolls a second factor as identified by the
MultiFactorAssertionparameter for thecurrent user.Declaration
Swift
@objc(enrollWithAssertion:displayName:completion:)openfuncenroll(withassertion:MultiFactorAssertion,displayName:String?,completion:((Error?)->Void)?)Parameters
assertiondisplayNameAn optional display name associated with the multi factor toenroll.
completionThe block invoked when the request is complete, or fails.
Enrolls a second factor as identified by the
MultiFactorAssertionparameter for thecurrent user.Declaration
Swift
@available(iOS13,tvOS13,macOS10.15,watchOS7,*)openfuncenroll(withassertion:MultiFactorAssertion,displayName:String?)asyncthrowsParameters
assertiondisplayNameAn 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
factorInfoThe second factor instance to unenroll.
completionThe 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)asyncthrowsUnenroll the given multi factor.
Declaration
Swift
@objc(unenrollWithFactorUID:completion:)openfuncunenroll(withFactorUIDfactorUID:String,completion:((Error?)->Void)?)Parameters
factorUIDThe unique identifier corresponding to thesecond factor being unenrolled.
completionThe 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:BoolUndocumented
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.