FirebaseAuth Framework Reference Stay organized with collections Save and categorize content based on your preferences.
TOTPSecret
@objc(FIRTOTPSecret)openclassTOTPSecret:NSObjectThe subclass of base class MultiFactorAssertion, used to assert ownership of a TOTP(Time-based One Time Password) second factor.
This class is available on iOS and macOS.
Returns the shared secret key/seed used to generate time-based one-time passwords.
Declaration
Swift
@objcopenfuncsharedSecretKey()->StringReturns a QRCode URL as described inhttps://github.com/google/google-authenticator/wiki/Key-Uri-Format.
This can be displayed to the user as a QRCode to be scanned into a TOTP app like GoogleAuthenticator.
Declaration
Swift
@objc(generateQRCodeURLWithAccountName:issuer:)openfuncgenerateQRCodeURL(withAccountNameaccountName:String,issuer:String)->StringParameters
accountNameThe name of the account/app.
issuerIssuer of the TOTP(likely the app name).
Return Value
A QRCode URL string.
Opens the specified QR Code URL in a password manager like iCloud Keychain.
See more detailshere
Declaration
Swift
@MainActor@objc(openInOTPAppWithQRCodeURL:)openfuncopenInOTPApp(withQRCodeURLqrCodeURL:String)
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.