From f41063da613e72f2bc398014c7b06442e234614f Mon Sep 17 00:00:00 2001 From: kabiroberai Date: Fri, 29 Jan 2021 17:51:12 +0530 Subject: [PATCH] Use trustedDevice 2FA even if secondaryAuth requested --- .../GrandSlamTwoFactorAuthenticateOperation.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift b/Supersign/GrandSlam/Operations/GrandSlamTwoFactorAuthenticateOperation.swift index b95f8cfe..fd969210 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) }