FIRTOTPMultiFactorGenerator
@interface FIRTOTPMultiFactorGenerator : NSObjectThe data structure used to help initialize an assertion for a second factor entity to the Firebase Auth/CICP server. Depending on the type of second factor, this will help generate the assertion. This class is available on iOS only.
-
Creates a TOTP secret as part of enrolling a TOTP second factor. Used for generating a QR code URL or inputting into a TOTP app. This method uses the auth instance corresponding to the user in the multiFactorSession.
Declaration
Objective-C
+ (void)generateSecretWithMultiFactorSession: (nonnull FIRMultiFactorSession *)session completion:(nonnull void (^)( FIRTOTPSecret *_Nullable, NSError *_Nullable))completion;Parameters
sessionThe multiFactorSession instance.
completionCompletion block
-
Initializes the MFA assertion to confirm ownership of the TOTP second factor. This assertion is used to complete enrollment of TOTP as a second factor.
Declaration
Objective-C
+ (nonnull FIRTOTPMultiFactorAssertion *) assertionForEnrollmentWithSecret:(nonnull FIRTOTPSecret *)secret oneTimePassword:(nonnull NSString *)oneTimePassword;Parameters
secretThe TOTP secret.
oneTimePasswordone time password string.
-
Initializes the MFA assertion to confirm ownership of the TOTP second factor. This assertion is used to complete signIn with TOTP as a second factor.
Declaration
Objective-C
+ (nonnull FIRTOTPMultiFactorAssertion *) assertionForSignInWithEnrollmentID:(nonnull NSString *)enrollmentID oneTimePassword:(nonnull NSString *)oneTimePassword;Parameters
enrollmentIDThe ID that identifies the enrolled TOTP second factor.
oneTimePasswordone time password string.