Skip to content

Commit

Permalink
platform build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Oct 3, 2023
1 parent 9ff72ae commit 6a016c3
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions FirebaseAuth/Tests/Unit/SwiftAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -414,26 +414,32 @@ class AuthAPI_hOnlyTests: XCTestCase {
}
#endif

func FIRTOTPSecret_h() {
let obj = TOTPSecret(secretKey: "key", hashingAlgorithm: "algo", codeLength: 9,
codeIntervalSeconds: 8, enrollmentCompletionDeadline: nil,
sessionInfo: "session")
_ = obj.sharedSecretKey()
_ = obj.generateQRCodeURL(withAccountName: "name", issuer: "issuer")
obj.openInOTPApp(withQRCodeURL: "url")
}
#if os(iOS)
func FIRTOTPSecret_h() {
let obj = TOTPSecret(secretKey: "key", hashingAlgorithm: "algo", codeLength: 9,
codeIntervalSeconds: 8, enrollmentCompletionDeadline: nil,
sessionInfo: "session")
_ = obj.sharedSecretKey()
_ = obj.generateQRCodeURL(withAccountName: "name", issuer: "issuer")
obj.openInOTPApp(withQRCodeURL: "url")
}

func FIRTOTPMultiFactorGenerator_h() {
TOTPMultiFactorGenerator.generateSecret(with: MultiFactorSession(mfaCredential: "")) { _, _ in
func FIRTOTPMultiFactorGenerator_h() {
TOTPMultiFactorGenerator.generateSecret(with: MultiFactorSession(mfaCredential: "")) { _, _ in
}
let secret = TOTPSecret(secretKey: "key",
hashingAlgorithm: "algo",
codeLength: 9,
codeIntervalSeconds: 8,
enrollmentCompletionDeadline: nil,
sessionInfo: "session")
_ = TOTPMultiFactorGenerator.assertionForEnrollment(with: secret,
oneTimePassword: "code")
_ = TOTPMultiFactorGenerator.assertionForSignIn(
withEnrollmentID: "id", oneTimePassword: "code"
)
}
let secret = TOTPSecret(secretKey: "key", hashingAlgorithm: "algo", codeLength: 9,
codeIntervalSeconds: 8, enrollmentCompletionDeadline: nil,
sessionInfo: "session")
_ = TOTPMultiFactorGenerator.assertionForEnrollment(with: secret,
oneTimePassword: "code")
_ = TOTPMultiFactorGenerator.assertionForSignIn(withEnrollmentID: "id",
oneTimePassword: "code")
}
#endif

@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
func FIRTOTPMultiFactorGenerator_hAsync() async throws {
Expand Down

0 comments on commit 6a016c3

Please sign in to comment.