Modern Apps git

← xtool.git

Use trustedDevice 2FA even if secondaryAuth requested

Commit
f41063da613e72f2bc398014c7b06442e234614f
Author
kabiroberai <[email protected]>
When
2021-01-29 12:21 UTC (5 years ago)
Parents
54f4b04

Diff

Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift
diff --git a/Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift b/Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swiftindex 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)         }