Skip to content

armgit / xtool

Public Imported from GitHub
0

Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, macOS.

Use trustedDevice 2FA even if secondaryAuth requested

kabiroberaif41063da613e
diff --git a/Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift b/Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift
index b95f8cf..fd96921 100644
--- a/Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift
+++ b/Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift
@@ -69,7 +69,11 @@ class GrandSlamTwoFactorAuthenticateOperation {
func perform(completion: @escaping (Result<(), Swift.Error>) -> Void) {
switch mode {
case .secondaryAuth:
- self.performSecondaryAuth(completion: completion)
+ // TODO: Does this always work?
+ // we *should* be calling performSecondaryAuth but that doesn't seem
+ // to actually trigger the 2fa prompt on trusted devices. Somehow
+ // using trustedDevice auth seems to work fine though
+ self.performTrustedDeviceAuth(completion: completion)
case .trustedDeviceSecondaryAuth:
self.performTrustedDeviceAuth(completion: completion)
}