TOTPSetupDetails
public struct TOTPSetupDetails
extension TOTPSetupDetails: Equatable
extension TOTPSetupDetails: Sendable
extension TOTPSetupDetails: CustomStringConvertible, CustomDebugStringConvertible, CustomReflectable
-
Secret code returned by the service to help setting up TOTP
Declaration
Swift
public let sharedSecret: String -
username that will be used to construct the URI
Declaration
Swift
public let username: String -
Declaration
Swift
public init(sharedSecret: String, username: String) -
Returns a TOTP setup URI that can help the customers avoid barcode scanning and use native password manager to handle TOTP association Example: On iOS and MacOS, URI will redirect to associated Password Manager for the platform
throws AuthError.validation if a
URLcannot be formed with the supplied parameters (for example, if the parameter string contains characters that are illegal in a URL, or is an empty string).Declaration
Swift
public func getSetupURI( appName: String, accountName: String? = nil ) throws -> URL -
The default struct printing, with the shared secret redacted: the details are logged as part of a sign-in or TOTP setup result, and the secret lets anyone generate the user’s TOTP codes. Use
sharedSecretorgetSetupURI(appName:accountName:)for the value.Declaration
Swift
public var description: String { get } -
Declaration
Swift
public var debugDescription: String { get } -
For
dumpand debuggers: the shared secret redacted.Declaration
Swift
public var customMirror: Mirror { get }
View on GitHub