Skip to content

Commit 709a685

Browse files
authored
[Auth] Revert unintentional commits on main (#14108)
1 parent 87925ed commit 709a685

File tree

5 files changed

+38
-44
lines changed

5 files changed

+38
-44
lines changed

FirebaseAuth/Sources/Swift/Auth/Auth.swift

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ extension Auth: AuthInterop {
219219
/// - user: The user object to be set as the current user of the calling Auth instance.
220220
/// - completion: Optionally; a block invoked after the user of the calling Auth instance has
221221
/// been updated or an error was encountered.
222-
@objc open func updateCurrentUser(_ user: User?,
223-
completion: (@Sendable (Error?) -> Void)? = nil) {
222+
@objc open func updateCurrentUser(_ user: User?, completion: ((Error?) -> Void)? = nil) {
224223
kAuthGlobalWorkQueue.async {
225224
guard let user else {
226225
let error = AuthErrorUtils.nullUserError(message: nil)
@@ -287,7 +286,7 @@ extension Auth: AuthInterop {
287286
)
288287
#endif // !FIREBASE_CI
289288
@objc open func fetchSignInMethods(forEmail email: String,
290-
completion: (@Sendable ([String]?, Error?) -> Void)? = nil) {
289+
completion: (([String]?, Error?) -> Void)? = nil) {
291290
kAuthGlobalWorkQueue.async {
292291
let request = CreateAuthURIRequest(identifier: email,
293292
continueURI: "http://www.google.com/",
@@ -351,7 +350,7 @@ extension Auth: AuthInterop {
351350
/// or is canceled. Invoked asynchronously on the main thread in the future.
352351
@objc open func signIn(withEmail email: String,
353352
password: String,
354-
completion: (@Sendable (AuthDataResult?, Error?) -> Void)? = nil) {
353+
completion: ((AuthDataResult?, Error?) -> Void)? = nil) {
355354
kAuthGlobalWorkQueue.async {
356355
let decoratedCallback = self.signInFlowAuthDataResultCallback(byDecorating: completion)
357356
Task {
@@ -450,7 +449,7 @@ extension Auth: AuthInterop {
450449
/// or is canceled. Invoked asynchronously on the main thread in the future.
451450
@objc open func signIn(withEmail email: String,
452451
link: String,
453-
completion: (@Sendable (AuthDataResult?, Error?) -> Void)? = nil) {
452+
completion: ((AuthDataResult?, Error?) -> Void)? = nil) {
454453
kAuthGlobalWorkQueue.async {
455454
let decoratedCallback = self.signInFlowAuthDataResultCallback(byDecorating: completion)
456455
let credential = EmailAuthCredential(withEmail: email, link: link)
@@ -529,7 +528,7 @@ extension Auth: AuthInterop {
529528
@objc(signInWithProvider:UIDelegate:completion:)
530529
open func signIn(with provider: FederatedAuthProvider,
531530
uiDelegate: AuthUIDelegate?,
532-
completion: (@Sendable (AuthDataResult?, Error?) -> Void)?) {
531+
completion: ((AuthDataResult?, Error?) -> Void)?) {
533532
kAuthGlobalWorkQueue.async {
534533
Task {
535534
let decoratedCallback = self.signInFlowAuthDataResultCallback(byDecorating: completion)
@@ -630,7 +629,7 @@ extension Auth: AuthInterop {
630629
/// or is canceled. Invoked asynchronously on the main thread in the future.
631630
@objc(signInWithCredential:completion:)
632631
open func signIn(with credential: AuthCredential,
633-
completion: (@Sendable (AuthDataResult?, Error?) -> Void)? = nil) {
632+
completion: ((AuthDataResult?, Error?) -> Void)? = nil) {
634633
kAuthGlobalWorkQueue.async {
635634
let decoratedCallback = self.signInFlowAuthDataResultCallback(byDecorating: completion)
636635
Task {
@@ -700,8 +699,7 @@ extension Auth: AuthInterop {
700699
/// not enabled. Enable them in the Auth section of the Firebase console.
701700
/// - Parameter completion: Optionally; a block which is invoked when the sign in finishes, or is
702701
/// canceled. Invoked asynchronously on the main thread in the future.
703-
@objc open func signInAnonymously(completion: (@Sendable (AuthDataResult?, Error?) -> Void)? =
704-
nil) {
702+
@objc open func signInAnonymously(completion: ((AuthDataResult?, Error?) -> Void)? = nil) {
705703
kAuthGlobalWorkQueue.async {
706704
let decoratedCallback = self.signInFlowAuthDataResultCallback(byDecorating: completion)
707705
if let currentUser = self.currentUser, currentUser.isAnonymous {
@@ -767,7 +765,7 @@ extension Auth: AuthInterop {
767765
/// - Parameter completion: Optionally; a block which is invoked when the sign in finishes, or is
768766
/// canceled. Invoked asynchronously on the main thread in the future.
769767
@objc open func signIn(withCustomToken token: String,
770-
completion: (@Sendable (AuthDataResult?, Error?) -> Void)? = nil) {
768+
completion: ((AuthDataResult?, Error?) -> Void)? = nil) {
771769
kAuthGlobalWorkQueue.async {
772770
let decoratedCallback = self.signInFlowAuthDataResultCallback(byDecorating: completion)
773771
let request = VerifyCustomTokenRequest(token: token,
@@ -836,7 +834,7 @@ extension Auth: AuthInterop {
836834
/// or is canceled. Invoked asynchronously on the main thread in the future.
837835
@objc open func createUser(withEmail email: String,
838836
password: String,
839-
completion: (@Sendable (AuthDataResult?, Error?) -> Void)? = nil) {
837+
completion: ((AuthDataResult?, Error?) -> Void)? = nil) {
840838
guard password.count > 0 else {
841839
if let completion {
842840
completion(nil, AuthErrorUtils.weakPasswordError(serverResponseReason: "Missing password"))
@@ -949,7 +947,7 @@ extension Auth: AuthInterop {
949947
/// - Parameter completion: Optionally; a block which is invoked when the request finishes.
950948
/// Invoked asynchronously on the main thread in the future.
951949
@objc open func confirmPasswordReset(withCode code: String, newPassword: String,
952-
completion: @Sendable @escaping (Error?) -> Void) {
950+
completion: @escaping (Error?) -> Void) {
953951
kAuthGlobalWorkQueue.async {
954952
let request = ResetPasswordRequest(oobCode: code,
955953
newPassword: newPassword,
@@ -989,8 +987,7 @@ extension Auth: AuthInterop {
989987
/// Invoked
990988
/// asynchronously on the main thread in the future.
991989
@objc open func checkActionCode(_ code: String,
992-
completion: @Sendable @escaping (ActionCodeInfo?, Error?)
993-
-> Void) {
990+
completion: @escaping (ActionCodeInfo?, Error?) -> Void) {
994991
kAuthGlobalWorkQueue.async {
995992
let request = ResetPasswordRequest(oobCode: code,
996993
newPassword: nil,
@@ -1035,8 +1032,7 @@ extension Auth: AuthInterop {
10351032
/// - Parameter completion: Optionally; a block which is invoked when the request finishes.
10361033
/// Invoked asynchronously on the main thread in the future.
10371034
@objc open func verifyPasswordResetCode(_ code: String,
1038-
completion: @Sendable @escaping (String?, Error?)
1039-
-> Void) {
1035+
completion: @escaping (String?, Error?) -> Void) {
10401036
checkActionCode(code) { info, error in
10411037
if let error {
10421038
completion(nil, error)
@@ -1069,8 +1065,7 @@ extension Auth: AuthInterop {
10691065
/// - Parameter code: The out of band code to be applied.
10701066
/// - Parameter completion: Optionally; a block which is invoked when the request finishes.
10711067
/// Invoked asynchronously on the main thread in the future.
1072-
@objc open func applyActionCode(_ code: String,
1073-
completion: @Sendable @escaping (Error?) -> Void) {
1068+
@objc open func applyActionCode(_ code: String, completion: @escaping (Error?) -> Void) {
10741069
kAuthGlobalWorkQueue.async {
10751070
let request = SetAccountInfoRequest(requestConfiguration: self.requestConfiguration)
10761071
request.oobCode = code
@@ -1115,7 +1110,7 @@ extension Auth: AuthInterop {
11151110
/// Invoked
11161111
/// asynchronously on the main thread in the future.
11171112
@objc open func sendPasswordReset(withEmail email: String,
1118-
completion: (@Sendable (Error?) -> Void)? = nil) {
1113+
completion: ((Error?) -> Void)? = nil) {
11191114
sendPasswordReset(withEmail: email, actionCodeSettings: nil, completion: completion)
11201115
}
11211116

@@ -1148,7 +1143,7 @@ extension Auth: AuthInterop {
11481143
/// Invoked asynchronously on the main thread in the future.
11491144
@objc open func sendPasswordReset(withEmail email: String,
11501145
actionCodeSettings: ActionCodeSettings?,
1151-
completion: (@Sendable (Error?) -> Void)? = nil) {
1146+
completion: ((Error?) -> Void)? = nil) {
11521147
kAuthGlobalWorkQueue.async {
11531148
let request = GetOOBConfirmationCodeRequest.passwordResetRequest(
11541149
email: email,
@@ -1217,7 +1212,7 @@ extension Auth: AuthInterop {
12171212
/// Invoked asynchronously on the main thread in the future.
12181213
@objc open func sendSignInLink(toEmail email: String,
12191214
actionCodeSettings: ActionCodeSettings,
1220-
completion: (@Sendable (Error?) -> Void)? = nil) {
1215+
completion: ((Error?) -> Void)? = nil) {
12211216
if !actionCodeSettings.handleCodeInApp {
12221217
fatalError("The handleCodeInApp flag in ActionCodeSettings must be true for Email-link " +
12231218
"Authentication.")

FirebaseAuth/Sources/Swift/AuthProvider/OAuthProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ import Foundation
268268
/// - Parameter completion: Optionally; a block which is invoked asynchronously on the main
269269
/// thread when the mobile web flow is completed.
270270
open func getCredentialWith(_ uiDelegate: AuthUIDelegate?,
271-
completion: (@Sendable (AuthCredential?, Error?) -> Void)? = nil) {
271+
completion: ((AuthCredential?, Error?) -> Void)? = nil) {
272272
guard let urlTypes = auth.mainBundleUrlTypes,
273273
AuthWebUtils.isCallbackSchemeRegistered(forCustomURLScheme: callbackScheme,
274274
urlTypes: urlTypes) else {

FirebaseAuth/Sources/Swift/AuthProvider/PhoneAuthProvider.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import Foundation
5252
@objc(verifyPhoneNumber:UIDelegate:completion:)
5353
open func verifyPhoneNumber(_ phoneNumber: String,
5454
uiDelegate: AuthUIDelegate? = nil,
55-
completion: (@Sendable (_: String?, _: Error?) -> Void)?) {
55+
completion: ((_: String?, _: Error?) -> Void)?) {
5656
verifyPhoneNumber(phoneNumber,
5757
uiDelegate: uiDelegate,
5858
multiFactorSession: nil,
@@ -71,7 +71,7 @@ import Foundation
7171
open func verifyPhoneNumber(_ phoneNumber: String,
7272
uiDelegate: AuthUIDelegate? = nil,
7373
multiFactorSession: MultiFactorSession? = nil,
74-
completion: (@Sendable (_: String?, _: Error?) -> Void)?) {
74+
completion: ((_: String?, _: Error?) -> Void)?) {
7575
guard AuthWebUtils.isCallbackSchemeRegistered(forCustomURLScheme: callbackScheme,
7676
urlTypes: auth.mainBundleUrlTypes) else {
7777
fatalError(
@@ -132,7 +132,7 @@ import Foundation
132132
open func verifyPhoneNumber(with multiFactorInfo: PhoneMultiFactorInfo,
133133
uiDelegate: AuthUIDelegate? = nil,
134134
multiFactorSession: MultiFactorSession?,
135-
completion: (@Sendable (_: String?, _: Error?) -> Void)?) {
135+
completion: ((_: String?, _: Error?) -> Void)?) {
136136
multiFactorSession?.multiFactorInfo = multiFactorInfo
137137
verifyPhoneNumber(multiFactorInfo.phoneNumber,
138138
uiDelegate: uiDelegate,

0 commit comments

Comments
 (0)