Skip to content

Commit 2c73bbb

Browse files
committed
style
1 parent 057affe commit 2c73bbb

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -108,28 +108,28 @@ class AuthBackend: AuthBackendProtocol {
108108
#if !os(iOS)
109109
return nil
110110
#else
111-
if let mfaResponse = response as? AuthMFAResponse,
112-
mfaResponse.idToken == nil,
113-
let enrollments = mfaResponse.mfaInfo {
114-
var info: [MultiFactorInfo] = []
115-
for enrollment in enrollments {
116-
// check which MFA factors are enabled.
117-
if let _ = enrollment.phoneInfo {
118-
info.append(PhoneMultiFactorInfo(proto: enrollment))
119-
} else if let _ = enrollment.totpInfo {
120-
info.append(TOTPMultiFactorInfo(proto: enrollment))
121-
} else {
122-
AuthLog.logError(code: "I-AUT000021", message: "Multifactor type is not supported")
111+
if let mfaResponse = response as? AuthMFAResponse,
112+
mfaResponse.idToken == nil,
113+
let enrollments = mfaResponse.mfaInfo {
114+
var info: [MultiFactorInfo] = []
115+
for enrollment in enrollments {
116+
// check which MFA factors are enabled.
117+
if let _ = enrollment.phoneInfo {
118+
info.append(PhoneMultiFactorInfo(proto: enrollment))
119+
} else if let _ = enrollment.totpInfo {
120+
info.append(TOTPMultiFactorInfo(proto: enrollment))
121+
} else {
122+
AuthLog.logError(code: "I-AUT000021", message: "Multifactor type is not supported")
123+
}
123124
}
125+
return AuthErrorUtils.secondFactorRequiredError(
126+
pendingCredential: mfaResponse.mfaPendingCredential,
127+
hints: info,
128+
auth: auth
129+
)
130+
} else {
131+
return nil
124132
}
125-
return AuthErrorUtils.secondFactorRequiredError(
126-
pendingCredential: mfaResponse.mfaPendingCredential,
127-
hints: info,
128-
auth: auth
129-
)
130-
} else {
131-
return nil
132-
}
133133
#endif // !os(iOS)
134134
}
135135

0 commit comments

Comments
 (0)