From ec0ec4e9ad4b8f0e1467483a611181e96df23f48 Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Sat, 24 Dec 2022 15:42:17 -0600 Subject: [PATCH 1/8] added blocking cloud function error handling --- FirebaseAuth/Sources/Backend/FIRAuthBackend.m | 11 +- .../Public/FirebaseAuth/FIRAuthErrors.h | 4 + .../Sources/Utilities/FIRAuthErrorUtils.h | 2 + .../Sources/Utilities/FIRAuthErrorUtils.m | 28 +++ .../Sources/Utilities/FIRAuthInternalErrors.h | 4 + .../AuthSample.xcodeproj/project.pbxproj | 206 ++++++++++++++++++ 6 files changed, 254 insertions(+), 1 deletion(-) diff --git a/FirebaseAuth/Sources/Backend/FIRAuthBackend.m b/FirebaseAuth/Sources/Backend/FIRAuthBackend.m index bbd942caa11..4aba4bbd4b9 100644 --- a/FirebaseAuth/Sources/Backend/FIRAuthBackend.m +++ b/FirebaseAuth/Sources/Backend/FIRAuthBackend.m @@ -468,6 +468,11 @@ */ static NSString *const kUnsupportedFirstFactorErrorMessage = @"UNSUPPORTED_FIRST_FACTOR"; +/** @var kBlockingCloudFunctionErrorResponse + @brief This is the error message blocking Cloud Functions. + */ +static NSString *const kBlockingCloudFunctionErrorResponse = @"BLOCKING_FUNCTION_ERROR_RESPONSE"; + /** @var kEmailChangeNeedsVerificationErrorMessage @brief This is the error message the server will respond with if changing an unverified email. */ @@ -1198,7 +1203,7 @@ + (nullable NSError *)clientErrorWithServerErrorMessage:(NSString *)serverErrorM return error; } } - + if ([shortErrorMessage isEqualToString:kUserNotFoundErrorMessage]) { return [FIRAuthErrorUtils userNotFoundErrorWithMessage:serverDetailErrorMessage]; } @@ -1446,6 +1451,10 @@ + (nullable NSError *)clientErrorWithServerErrorMessage:(NSString *)serverErrorM if ([shortErrorMessage isEqualToString:kUnsupportedTenantOperation]) { return [FIRAuthErrorUtils unsupportedTenantOperationError]; } + + if ([shortErrorMessage isEqualToString:kBlockingCloudFunctionErrorResponse]) { + return [FIRAuthErrorUtils blockingCloudFunctionServerResponseWithMessage:serverDetailErrorMessage]; + } // In this case we handle an error that might be specified in the underlying errors dictionary, // the error message in determined based on the @c reason key in the dictionary. diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h index 95047813572..668b35de3d3 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h @@ -429,6 +429,10 @@ typedef NS_ERROR_ENUM(FIRAuthErrorDomain, FIRAuthErrorCode){ describing which step of the JWT parsing process failed. */ FIRAuthErrorCodeMalformedJWT = 18000, + + /** Raised when an Cloud Function returns a blocking error. Will include a message returned from the function. + */ + FIRAuthErrorCodeBlockingCloudFunctionError = 18001, } NS_SWIFT_NAME(AuthErrorCode); @end diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h index 7bdefab7426..67b2865c9c4 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h +++ b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h @@ -605,6 +605,8 @@ NS_ASSUME_NONNULL_BEGIN */ + (NSError *)unsupportedTenantOperationError; ++ (NSError *)blockingCloudFunctionServerResponseWithMessage:(NSString *)response; + @end NS_ASSUME_NONNULL_END diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m index e49324918bf..18451a3eab4 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m +++ b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m @@ -591,6 +591,12 @@ @"This operation is not" "supported in a multi-tenant context."; +/** @var kFIRAuthErrorMessageBlockingCloudFunctionReturnedError + @brief Message for @c FIRAuthErrorCodeBlockingCloudFunctionError error code. + */ +static NSString *const kFIRAuthErrorMessageBlockingCloudFunctionReturnedError = + @"Blocking cloud function returned an error."; + /** @var FIRAuthErrorDescription @brief The error descrioption, based on the error code. @remarks No default case so that we get a compiler warning if a new value was added to the enum. @@ -755,6 +761,8 @@ return kFIRAuthErrorMessageTenantIDMismatch; case FIRAuthErrorCodeUnsupportedTenantOperation: return kFIRAuthErrorMessageUnsupportedTenantOperation; + case FIRAuthErrorCodeBlockingCloudFunctionError: + return kFIRAuthErrorMessageBlockingCloudFunctionReturnedError; } } @@ -922,6 +930,8 @@ return @"ERROR_TENANT_ID_MISMATCH"; case FIRAuthErrorCodeUnsupportedTenantOperation: return @"ERROR_UNSUPPORTED_TENANT_OPERATION"; + case FIRAuthErrorCodeBlockingCloudFunctionError: + return @"ERROR_BLOCKING_CLOUD_FUNCTION_RETURNED_ERROR"; } } @@ -1405,6 +1415,24 @@ + (NSError *)unsupportedTenantOperationError { return [self errorWithCode:FIRAuthInternalErrorCodeUnsupportedTenantOperation]; } ++ (NSError *)blockingCloudFunctionServerResponseWithMessage:(NSString *)response { + NSString *jsonString = [response stringByReplacingOccurrencesOfString:@"HTTP Cloud Function returned an error:" withString:@""]; + jsonString = [jsonString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + + NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + NSError *jsonError; + NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&jsonError]; + + if (jsonError) { + return [self JSONSerializationErrorWithUnderlyingError:jsonError]; + } + + NSDictionary *errorDict = jsonDict[@"error"]; + NSString *message = errorDict[@"message"]; + + return [self errorWithCode:FIRAuthInternalErrorBlockingCloudFunctionError message:message]; +} + @end NS_ASSUME_NONNULL_END diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h b/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h index d8a29707732..2bbd599e65b 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h +++ b/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h @@ -476,6 +476,10 @@ typedef NS_ENUM(NSInteger, FIRAuthInternalErrorCode) { FIRAuthErrorCodeInvalidDynamicLinkDomain, FIRAuthInternalErrorCodeMalformedJWT = FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMalformedJWT, + + /** Indicates that an authentication blocking cloud function returned an error. + */ + FIRAuthInternalErrorBlockingCloudFunctionError = FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeBlockingCloudFunctionError, /** @var FIRAuthInternalErrorCodeRPCRequestEncodingError @brief Indicates an error encoding the RPC request. diff --git a/FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/project.pbxproj b/FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/project.pbxproj index a126512cae3..c292c09c6bf 100644 --- a/FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/project.pbxproj +++ b/FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/project.pbxproj @@ -7,7 +7,11 @@ objects = { /* Begin PBXBuildFile section */ + 01FFDAAA77DA16EB3FF8D384 /* Pods_Auth_ApiTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF364171DEE37363A6997CC7 /* Pods_Auth_ApiTests.framework */; }; + 0CAF1F9B65B5DA8B6B4E8558 /* Pods_SwiftApiTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 359F1CD690EB5E8CE68946D9 /* Pods_SwiftApiTests.framework */; }; 400283EA23EA254B0006A298 /* MainViewController+MultiFactor.m in Sources */ = {isa = PBXBuildFile; fileRef = 400283E923EA254A0006A298 /* MainViewController+MultiFactor.m */; }; + 6DDEF67240D8EA5D1024C309 /* Pods_Auth_E2eTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1DBFD468206FB6E85BEFA15 /* Pods_Auth_E2eTests.framework */; }; + B31CDC2215849BE8BF09CA1C /* Pods_AuthSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6727212AFED84C51946DA6C9 /* Pods_AuthSample.framework */; }; DE1865AC245B879B00F8AD70 /* TestsBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE1865AB245B879B00F8AD70 /* TestsBase.swift */; }; DE1865AE245B8A1400F8AD70 /* AnonymousTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE1865AD245B8A1400F8AD70 /* AnonymousTests.swift */; }; DE1865B2245C7A2B00F8AD70 /* EmailPasswordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE1865B1245C7A2B00F8AD70 /* EmailPasswordTests.swift */; }; @@ -86,8 +90,18 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 1B0EE479E7F7FF8C5FF93BE8 /* Pods-Auth_ApiTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Auth_ApiTests.release.xcconfig"; path = "Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests.release.xcconfig"; sourceTree = ""; }; + 315530E15246D4F7AA8173B2 /* Pods-SwiftApiTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftApiTests.release.xcconfig"; path = "Target Support Files/Pods-SwiftApiTests/Pods-SwiftApiTests.release.xcconfig"; sourceTree = ""; }; + 359F1CD690EB5E8CE68946D9 /* Pods_SwiftApiTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftApiTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 35FD71CA3470B7AAC1BE0598 /* Pods-SwiftApiTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftApiTests.debug.xcconfig"; path = "Target Support Files/Pods-SwiftApiTests/Pods-SwiftApiTests.debug.xcconfig"; sourceTree = ""; }; + 3BA54A5941AED943CCA94607 /* Pods-Auth_E2eTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Auth_E2eTests.debug.xcconfig"; path = "Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests.debug.xcconfig"; sourceTree = ""; }; 400283E823EA254A0006A298 /* MainViewController+MultiFactor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MainViewController+MultiFactor.h"; sourceTree = ""; }; 400283E923EA254A0006A298 /* MainViewController+MultiFactor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MainViewController+MultiFactor.m"; sourceTree = ""; }; + 490C6881BA6B95ED20135A7F /* Pods-AuthSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AuthSample.release.xcconfig"; path = "Target Support Files/Pods-AuthSample/Pods-AuthSample.release.xcconfig"; sourceTree = ""; }; + 6727212AFED84C51946DA6C9 /* Pods_AuthSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AuthSample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BEEC69F3E237303B633A4A3B /* Pods-AuthSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AuthSample.debug.xcconfig"; path = "Target Support Files/Pods-AuthSample/Pods-AuthSample.debug.xcconfig"; sourceTree = ""; }; + D1DBFD468206FB6E85BEFA15 /* Pods_Auth_E2eTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Auth_E2eTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D83C2CC2ABDED1280ADE42AC /* Pods-Auth_E2eTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Auth_E2eTests.release.xcconfig"; path = "Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests.release.xcconfig"; sourceTree = ""; }; DE1865AB245B879B00F8AD70 /* TestsBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestsBase.swift; sourceTree = ""; }; DE1865AD245B8A1400F8AD70 /* AnonymousTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnonymousTests.swift; sourceTree = ""; }; DE1865B1245C7A2B00F8AD70 /* EmailPasswordTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailPasswordTests.swift; sourceTree = ""; }; @@ -182,6 +196,8 @@ DED400BE243E571500BF6D56 /* FIRAuthE2eTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRAuthE2eTests.m; sourceTree = ""; }; DED400BF243E571500BF6D56 /* FIRAuthE2eTestsBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRAuthE2eTestsBase.m; sourceTree = ""; }; DEF68E942799B9970064CC92 /* SwiftAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftAPI.swift; sourceTree = ""; }; + E5D9676B35D76A2EDD039D2C /* Pods-Auth_ApiTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Auth_ApiTests.debug.xcconfig"; path = "Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests.debug.xcconfig"; sourceTree = ""; }; + EF364171DEE37363A6997CC7 /* Pods_Auth_ApiTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Auth_ApiTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -189,6 +205,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + B31CDC2215849BE8BF09CA1C /* Pods_AuthSample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -196,6 +213,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 01FFDAAA77DA16EB3FF8D384 /* Pods_Auth_ApiTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -203,6 +221,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6DDEF67240D8EA5D1024C309 /* Pods_Auth_E2eTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -210,12 +229,24 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 0CAF1F9B65B5DA8B6B4E8558 /* Pods_SwiftApiTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 705ADDF9ED3D55DE4092E09D /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6727212AFED84C51946DA6C9 /* Pods_AuthSample.framework */, + EF364171DEE37363A6997CC7 /* Pods_Auth_ApiTests.framework */, + D1DBFD468206FB6E85BEFA15 /* Pods_Auth_E2eTests.framework */, + 359F1CD690EB5E8CE68946D9 /* Pods_SwiftApiTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; DE800AEB22A2F87E00AC9A23 = { isa = PBXGroup; children = ( @@ -224,6 +255,8 @@ DE800B9622A5BD1800AC9A23 /* E2eTests */, DEBEF6042450EA27005E1A8F /* SwiftApiTests */, DE800AF522A2F87E00AC9A23 /* Products */, + E5BEBC4EF2A2C779F3C485A3 /* Pods */, + 705ADDF9ED3D55DE4092E09D /* Frameworks */, ); sourceTree = ""; }; @@ -359,6 +392,22 @@ path = SwiftApiTests; sourceTree = ""; }; + E5BEBC4EF2A2C779F3C485A3 /* Pods */ = { + isa = PBXGroup; + children = ( + BEEC69F3E237303B633A4A3B /* Pods-AuthSample.debug.xcconfig */, + 490C6881BA6B95ED20135A7F /* Pods-AuthSample.release.xcconfig */, + E5D9676B35D76A2EDD039D2C /* Pods-Auth_ApiTests.debug.xcconfig */, + 1B0EE479E7F7FF8C5FF93BE8 /* Pods-Auth_ApiTests.release.xcconfig */, + 3BA54A5941AED943CCA94607 /* Pods-Auth_E2eTests.debug.xcconfig */, + D83C2CC2ABDED1280ADE42AC /* Pods-Auth_E2eTests.release.xcconfig */, + 35FD71CA3470B7AAC1BE0598 /* Pods-SwiftApiTests.debug.xcconfig */, + 315530E15246D4F7AA8173B2 /* Pods-SwiftApiTests.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -366,9 +415,11 @@ isa = PBXNativeTarget; buildConfigurationList = DE800B0A22A2F88000AC9A23 /* Build configuration list for PBXNativeTarget "AuthSample" */; buildPhases = ( + 32BDD08E6054F886289D11B1 /* [CP] Check Pods Manifest.lock */, DE800AF022A2F87E00AC9A23 /* Sources */, DE800AF122A2F87E00AC9A23 /* Frameworks */, DE800AF222A2F87E00AC9A23 /* Resources */, + F895BBFABDBAA92F3C811C51 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -383,9 +434,11 @@ isa = PBXNativeTarget; buildConfigurationList = DE800B7A22A5927C00AC9A23 /* Build configuration list for PBXNativeTarget "Auth_ApiTests" */; buildPhases = ( + 1F8F34C60CB81E2B1DE11DAD /* [CP] Check Pods Manifest.lock */, DE800B6D22A5927C00AC9A23 /* Sources */, DE800B6E22A5927C00AC9A23 /* Frameworks */, DE800B6F22A5927C00AC9A23 /* Resources */, + C957E46BE9D277174B3FC81B /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -401,9 +454,11 @@ isa = PBXNativeTarget; buildConfigurationList = DE800B9C22A5BD1800AC9A23 /* Build configuration list for PBXNativeTarget "Auth_E2eTests" */; buildPhases = ( + 4BDA56626C2624AE3E93DA93 /* [CP] Check Pods Manifest.lock */, DE800B9122A5BD1800AC9A23 /* Sources */, DE800B9222A5BD1800AC9A23 /* Frameworks */, DE800B9322A5BD1800AC9A23 /* Resources */, + 856916E1BFE3A228E1308AC8 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -419,6 +474,7 @@ isa = PBXNativeTarget; buildConfigurationList = DEBEF60A2450EA27005E1A8F /* Build configuration list for PBXNativeTarget "SwiftApiTests" */; buildPhases = ( + 1B175CF76A6A4B9B1646AAE9 /* [CP] Check Pods Manifest.lock */, DEBEF5FF2450EA27005E1A8F /* Sources */, DEBEF6002450EA27005E1A8F /* Frameworks */, DEBEF6012450EA27005E1A8F /* Resources */, @@ -521,6 +577,148 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 1B175CF76A6A4B9B1646AAE9 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwiftApiTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 1F8F34C60CB81E2B1DE11DAD /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Auth_ApiTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 32BDD08E6054F886289D11B1 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-AuthSample-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 4BDA56626C2624AE3E93DA93 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Auth_E2eTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 856916E1BFE3A228E1308AC8 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + C957E46BE9D277174B3FC81B /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + F895BBFABDBAA92F3C811C51 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-AuthSample/Pods-AuthSample-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-AuthSample/Pods-AuthSample-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AuthSample/Pods-AuthSample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ DE800AF022A2F87E00AC9A23 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -730,6 +928,7 @@ }; DE800B0B22A2F88000AC9A23 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = BEEC69F3E237303B633A4A3B /* Pods-AuthSample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -754,6 +953,7 @@ }; DE800B0C22A2F88000AC9A23 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 490C6881BA6B95ED20135A7F /* Pods-AuthSample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -777,6 +977,7 @@ }; DE800B7822A5927C00AC9A23 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = E5D9676B35D76A2EDD039D2C /* Pods-Auth_ApiTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ENABLE_MODULES = YES; @@ -799,6 +1000,7 @@ }; DE800B7922A5927C00AC9A23 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 1B0EE479E7F7FF8C5FF93BE8 /* Pods-Auth_ApiTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ENABLE_MODULES = YES; @@ -820,6 +1022,7 @@ }; DE800B9D22A5BD1800AC9A23 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3BA54A5941AED943CCA94607 /* Pods-Auth_E2eTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -838,6 +1041,7 @@ }; DE800B9E22A5BD1800AC9A23 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D83C2CC2ABDED1280ADE42AC /* Pods-Auth_E2eTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -856,6 +1060,7 @@ }; DEBEF60B2450EA27005E1A8F /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 35FD71CA3470B7AAC1BE0598 /* Pods-SwiftApiTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -878,6 +1083,7 @@ }; DEBEF60C2450EA27005E1A8F /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 315530E15246D4F7AA8173B2 /* Pods-SwiftApiTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; From 8c5fec34a96d5a04d3fc99dc1720e2ce114f12d7 Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Fri, 30 Dec 2022 23:19:42 -0600 Subject: [PATCH 2/8] fixed formatting issues --- FirebaseAuth/Sources/Backend/FIRAuthBackend.m | 7 ++-- .../Public/FirebaseAuth/FIRAuthErrors.h | 5 +-- .../Sources/Utilities/FIRAuthErrorUtils.m | 34 +++++++++++-------- .../Sources/Utilities/FIRAuthInternalErrors.h | 7 ++-- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/FirebaseAuth/Sources/Backend/FIRAuthBackend.m b/FirebaseAuth/Sources/Backend/FIRAuthBackend.m index 4aba4bbd4b9..304c7160d95 100644 --- a/FirebaseAuth/Sources/Backend/FIRAuthBackend.m +++ b/FirebaseAuth/Sources/Backend/FIRAuthBackend.m @@ -1203,7 +1203,7 @@ + (nullable NSError *)clientErrorWithServerErrorMessage:(NSString *)serverErrorM return error; } } - + if ([shortErrorMessage isEqualToString:kUserNotFoundErrorMessage]) { return [FIRAuthErrorUtils userNotFoundErrorWithMessage:serverDetailErrorMessage]; } @@ -1451,9 +1451,10 @@ + (nullable NSError *)clientErrorWithServerErrorMessage:(NSString *)serverErrorM if ([shortErrorMessage isEqualToString:kUnsupportedTenantOperation]) { return [FIRAuthErrorUtils unsupportedTenantOperationError]; } - + if ([shortErrorMessage isEqualToString:kBlockingCloudFunctionErrorResponse]) { - return [FIRAuthErrorUtils blockingCloudFunctionServerResponseWithMessage:serverDetailErrorMessage]; + return + [FIRAuthErrorUtils blockingCloudFunctionServerResponseWithMessage:serverDetailErrorMessage]; } // In this case we handle an error that might be specified in the underlying errors dictionary, diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h index 668b35de3d3..c282d241914 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h @@ -429,8 +429,9 @@ typedef NS_ERROR_ENUM(FIRAuthErrorDomain, FIRAuthErrorCode){ describing which step of the JWT parsing process failed. */ FIRAuthErrorCodeMalformedJWT = 18000, - - /** Raised when an Cloud Function returns a blocking error. Will include a message returned from the function. + + /** Raised when an Cloud Function returns a blocking error. Will include a message returned from + * the function. */ FIRAuthErrorCodeBlockingCloudFunctionError = 18001, } NS_SWIFT_NAME(AuthErrorCode); diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m index 18451a3eab4..8cd0e75fd5a 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m +++ b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m @@ -1416,21 +1416,25 @@ + (NSError *)unsupportedTenantOperationError { } + (NSError *)blockingCloudFunctionServerResponseWithMessage:(NSString *)response { - NSString *jsonString = [response stringByReplacingOccurrencesOfString:@"HTTP Cloud Function returned an error:" withString:@""]; - jsonString = [jsonString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; - - NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - NSError *jsonError; - NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&jsonError]; - - if (jsonError) { - return [self JSONSerializationErrorWithUnderlyingError:jsonError]; - } - - NSDictionary *errorDict = jsonDict[@"error"]; - NSString *message = errorDict[@"message"]; - - return [self errorWithCode:FIRAuthInternalErrorBlockingCloudFunctionError message:message]; + NSString *jsonString = + [response stringByReplacingOccurrencesOfString:@"HTTP Cloud Function returned an error:" + withString:@""]; + jsonString = [jsonString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + + NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + NSError *jsonError; + NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData + options:0 + error:&jsonError]; + + if (jsonError) { + return [self JSONSerializationErrorWithUnderlyingError:jsonError]; + } + + NSDictionary *errorDict = jsonDict[@"error"]; + NSString *message = errorDict[@"message"]; + + return [self errorWithCode:FIRAuthInternalErrorBlockingCloudFunctionError message:message]; } @end diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h b/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h index 2bbd599e65b..96046f8a33f 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h +++ b/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h @@ -476,10 +476,11 @@ typedef NS_ENUM(NSInteger, FIRAuthInternalErrorCode) { FIRAuthErrorCodeInvalidDynamicLinkDomain, FIRAuthInternalErrorCodeMalformedJWT = FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMalformedJWT, - + /** Indicates that an authentication blocking cloud function returned an error. - */ - FIRAuthInternalErrorBlockingCloudFunctionError = FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeBlockingCloudFunctionError, + */ + FIRAuthInternalErrorBlockingCloudFunctionError = FIRAuthPublicErrorCodeFlag | + FIRAuthErrorCodeBlockingCloudFunctionError, /** @var FIRAuthInternalErrorCodeRPCRequestEncodingError @brief Indicates an error encoding the RPC request. From a48c91259c7922c14ea544df233305e01c0bf65c Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Sat, 31 Dec 2022 22:13:58 -0600 Subject: [PATCH 3/8] ran pod deintegrate --- .../AuthSample.xcodeproj/project.pbxproj | 206 ------------------ 1 file changed, 206 deletions(-) diff --git a/FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/project.pbxproj b/FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/project.pbxproj index c292c09c6bf..a126512cae3 100644 --- a/FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/project.pbxproj +++ b/FirebaseAuth/Tests/Sample/AuthSample.xcodeproj/project.pbxproj @@ -7,11 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 01FFDAAA77DA16EB3FF8D384 /* Pods_Auth_ApiTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF364171DEE37363A6997CC7 /* Pods_Auth_ApiTests.framework */; }; - 0CAF1F9B65B5DA8B6B4E8558 /* Pods_SwiftApiTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 359F1CD690EB5E8CE68946D9 /* Pods_SwiftApiTests.framework */; }; 400283EA23EA254B0006A298 /* MainViewController+MultiFactor.m in Sources */ = {isa = PBXBuildFile; fileRef = 400283E923EA254A0006A298 /* MainViewController+MultiFactor.m */; }; - 6DDEF67240D8EA5D1024C309 /* Pods_Auth_E2eTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1DBFD468206FB6E85BEFA15 /* Pods_Auth_E2eTests.framework */; }; - B31CDC2215849BE8BF09CA1C /* Pods_AuthSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6727212AFED84C51946DA6C9 /* Pods_AuthSample.framework */; }; DE1865AC245B879B00F8AD70 /* TestsBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE1865AB245B879B00F8AD70 /* TestsBase.swift */; }; DE1865AE245B8A1400F8AD70 /* AnonymousTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE1865AD245B8A1400F8AD70 /* AnonymousTests.swift */; }; DE1865B2245C7A2B00F8AD70 /* EmailPasswordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE1865B1245C7A2B00F8AD70 /* EmailPasswordTests.swift */; }; @@ -90,18 +86,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 1B0EE479E7F7FF8C5FF93BE8 /* Pods-Auth_ApiTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Auth_ApiTests.release.xcconfig"; path = "Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests.release.xcconfig"; sourceTree = ""; }; - 315530E15246D4F7AA8173B2 /* Pods-SwiftApiTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftApiTests.release.xcconfig"; path = "Target Support Files/Pods-SwiftApiTests/Pods-SwiftApiTests.release.xcconfig"; sourceTree = ""; }; - 359F1CD690EB5E8CE68946D9 /* Pods_SwiftApiTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftApiTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 35FD71CA3470B7AAC1BE0598 /* Pods-SwiftApiTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftApiTests.debug.xcconfig"; path = "Target Support Files/Pods-SwiftApiTests/Pods-SwiftApiTests.debug.xcconfig"; sourceTree = ""; }; - 3BA54A5941AED943CCA94607 /* Pods-Auth_E2eTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Auth_E2eTests.debug.xcconfig"; path = "Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests.debug.xcconfig"; sourceTree = ""; }; 400283E823EA254A0006A298 /* MainViewController+MultiFactor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MainViewController+MultiFactor.h"; sourceTree = ""; }; 400283E923EA254A0006A298 /* MainViewController+MultiFactor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MainViewController+MultiFactor.m"; sourceTree = ""; }; - 490C6881BA6B95ED20135A7F /* Pods-AuthSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AuthSample.release.xcconfig"; path = "Target Support Files/Pods-AuthSample/Pods-AuthSample.release.xcconfig"; sourceTree = ""; }; - 6727212AFED84C51946DA6C9 /* Pods_AuthSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AuthSample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BEEC69F3E237303B633A4A3B /* Pods-AuthSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AuthSample.debug.xcconfig"; path = "Target Support Files/Pods-AuthSample/Pods-AuthSample.debug.xcconfig"; sourceTree = ""; }; - D1DBFD468206FB6E85BEFA15 /* Pods_Auth_E2eTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Auth_E2eTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D83C2CC2ABDED1280ADE42AC /* Pods-Auth_E2eTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Auth_E2eTests.release.xcconfig"; path = "Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests.release.xcconfig"; sourceTree = ""; }; DE1865AB245B879B00F8AD70 /* TestsBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestsBase.swift; sourceTree = ""; }; DE1865AD245B8A1400F8AD70 /* AnonymousTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnonymousTests.swift; sourceTree = ""; }; DE1865B1245C7A2B00F8AD70 /* EmailPasswordTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailPasswordTests.swift; sourceTree = ""; }; @@ -196,8 +182,6 @@ DED400BE243E571500BF6D56 /* FIRAuthE2eTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRAuthE2eTests.m; sourceTree = ""; }; DED400BF243E571500BF6D56 /* FIRAuthE2eTestsBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRAuthE2eTestsBase.m; sourceTree = ""; }; DEF68E942799B9970064CC92 /* SwiftAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftAPI.swift; sourceTree = ""; }; - E5D9676B35D76A2EDD039D2C /* Pods-Auth_ApiTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Auth_ApiTests.debug.xcconfig"; path = "Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests.debug.xcconfig"; sourceTree = ""; }; - EF364171DEE37363A6997CC7 /* Pods_Auth_ApiTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Auth_ApiTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -205,7 +189,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B31CDC2215849BE8BF09CA1C /* Pods_AuthSample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -213,7 +196,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 01FFDAAA77DA16EB3FF8D384 /* Pods_Auth_ApiTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -221,7 +203,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6DDEF67240D8EA5D1024C309 /* Pods_Auth_E2eTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -229,24 +210,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0CAF1F9B65B5DA8B6B4E8558 /* Pods_SwiftApiTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 705ADDF9ED3D55DE4092E09D /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6727212AFED84C51946DA6C9 /* Pods_AuthSample.framework */, - EF364171DEE37363A6997CC7 /* Pods_Auth_ApiTests.framework */, - D1DBFD468206FB6E85BEFA15 /* Pods_Auth_E2eTests.framework */, - 359F1CD690EB5E8CE68946D9 /* Pods_SwiftApiTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; DE800AEB22A2F87E00AC9A23 = { isa = PBXGroup; children = ( @@ -255,8 +224,6 @@ DE800B9622A5BD1800AC9A23 /* E2eTests */, DEBEF6042450EA27005E1A8F /* SwiftApiTests */, DE800AF522A2F87E00AC9A23 /* Products */, - E5BEBC4EF2A2C779F3C485A3 /* Pods */, - 705ADDF9ED3D55DE4092E09D /* Frameworks */, ); sourceTree = ""; }; @@ -392,22 +359,6 @@ path = SwiftApiTests; sourceTree = ""; }; - E5BEBC4EF2A2C779F3C485A3 /* Pods */ = { - isa = PBXGroup; - children = ( - BEEC69F3E237303B633A4A3B /* Pods-AuthSample.debug.xcconfig */, - 490C6881BA6B95ED20135A7F /* Pods-AuthSample.release.xcconfig */, - E5D9676B35D76A2EDD039D2C /* Pods-Auth_ApiTests.debug.xcconfig */, - 1B0EE479E7F7FF8C5FF93BE8 /* Pods-Auth_ApiTests.release.xcconfig */, - 3BA54A5941AED943CCA94607 /* Pods-Auth_E2eTests.debug.xcconfig */, - D83C2CC2ABDED1280ADE42AC /* Pods-Auth_E2eTests.release.xcconfig */, - 35FD71CA3470B7AAC1BE0598 /* Pods-SwiftApiTests.debug.xcconfig */, - 315530E15246D4F7AA8173B2 /* Pods-SwiftApiTests.release.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -415,11 +366,9 @@ isa = PBXNativeTarget; buildConfigurationList = DE800B0A22A2F88000AC9A23 /* Build configuration list for PBXNativeTarget "AuthSample" */; buildPhases = ( - 32BDD08E6054F886289D11B1 /* [CP] Check Pods Manifest.lock */, DE800AF022A2F87E00AC9A23 /* Sources */, DE800AF122A2F87E00AC9A23 /* Frameworks */, DE800AF222A2F87E00AC9A23 /* Resources */, - F895BBFABDBAA92F3C811C51 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -434,11 +383,9 @@ isa = PBXNativeTarget; buildConfigurationList = DE800B7A22A5927C00AC9A23 /* Build configuration list for PBXNativeTarget "Auth_ApiTests" */; buildPhases = ( - 1F8F34C60CB81E2B1DE11DAD /* [CP] Check Pods Manifest.lock */, DE800B6D22A5927C00AC9A23 /* Sources */, DE800B6E22A5927C00AC9A23 /* Frameworks */, DE800B6F22A5927C00AC9A23 /* Resources */, - C957E46BE9D277174B3FC81B /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -454,11 +401,9 @@ isa = PBXNativeTarget; buildConfigurationList = DE800B9C22A5BD1800AC9A23 /* Build configuration list for PBXNativeTarget "Auth_E2eTests" */; buildPhases = ( - 4BDA56626C2624AE3E93DA93 /* [CP] Check Pods Manifest.lock */, DE800B9122A5BD1800AC9A23 /* Sources */, DE800B9222A5BD1800AC9A23 /* Frameworks */, DE800B9322A5BD1800AC9A23 /* Resources */, - 856916E1BFE3A228E1308AC8 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -474,7 +419,6 @@ isa = PBXNativeTarget; buildConfigurationList = DEBEF60A2450EA27005E1A8F /* Build configuration list for PBXNativeTarget "SwiftApiTests" */; buildPhases = ( - 1B175CF76A6A4B9B1646AAE9 /* [CP] Check Pods Manifest.lock */, DEBEF5FF2450EA27005E1A8F /* Sources */, DEBEF6002450EA27005E1A8F /* Frameworks */, DEBEF6012450EA27005E1A8F /* Resources */, @@ -577,148 +521,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 1B175CF76A6A4B9B1646AAE9 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SwiftApiTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 1F8F34C60CB81E2B1DE11DAD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Auth_ApiTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 32BDD08E6054F886289D11B1 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-AuthSample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 4BDA56626C2624AE3E93DA93 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Auth_E2eTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 856916E1BFE3A228E1308AC8 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Auth_E2eTests/Pods-Auth_E2eTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - C957E46BE9D277174B3FC81B /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Auth_ApiTests/Pods-Auth_ApiTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - F895BBFABDBAA92F3C811C51 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AuthSample/Pods-AuthSample-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AuthSample/Pods-AuthSample-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AuthSample/Pods-AuthSample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ DE800AF022A2F87E00AC9A23 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -928,7 +730,6 @@ }; DE800B0B22A2F88000AC9A23 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BEEC69F3E237303B633A4A3B /* Pods-AuthSample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -953,7 +754,6 @@ }; DE800B0C22A2F88000AC9A23 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 490C6881BA6B95ED20135A7F /* Pods-AuthSample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -977,7 +777,6 @@ }; DE800B7822A5927C00AC9A23 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E5D9676B35D76A2EDD039D2C /* Pods-Auth_ApiTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ENABLE_MODULES = YES; @@ -1000,7 +799,6 @@ }; DE800B7922A5927C00AC9A23 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1B0EE479E7F7FF8C5FF93BE8 /* Pods-Auth_ApiTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ENABLE_MODULES = YES; @@ -1022,7 +820,6 @@ }; DE800B9D22A5BD1800AC9A23 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3BA54A5941AED943CCA94607 /* Pods-Auth_E2eTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -1041,7 +838,6 @@ }; DE800B9E22A5BD1800AC9A23 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D83C2CC2ABDED1280ADE42AC /* Pods-Auth_E2eTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -1060,7 +856,6 @@ }; DEBEF60B2450EA27005E1A8F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 35FD71CA3470B7AAC1BE0598 /* Pods-SwiftApiTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -1083,7 +878,6 @@ }; DEBEF60C2450EA27005E1A8F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 315530E15246D4F7AA8173B2 /* Pods-SwiftApiTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; From 58257b779f53ec1bf2571af2b86f0a1bd10081b1 Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Sun, 1 Jan 2023 16:59:56 -0600 Subject: [PATCH 4/8] fixed nullable issue --- FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m index 8cd0e75fd5a..1d11c4b688e 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m +++ b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m @@ -1415,7 +1415,11 @@ + (NSError *)unsupportedTenantOperationError { return [self errorWithCode:FIRAuthInternalErrorCodeUnsupportedTenantOperation]; } -+ (NSError *)blockingCloudFunctionServerResponseWithMessage:(NSString *)response { ++ (NSError *)blockingCloudFunctionServerResponseWithMessage:(nullable NSString *)response { + if (response == nil) { + return [self errorWithCode:FIRAuthInternalErrorBlockingCloudFunctionError message:message]; + } + NSString *jsonString = [response stringByReplacingOccurrencesOfString:@"HTTP Cloud Function returned an error:" withString:@""]; From f2de424169bb2cc392fda9858a96720f3d345ac7 Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Mon, 2 Jan 2023 09:27:55 -0600 Subject: [PATCH 5/8] fixed issue with nullability check --- FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h | 2 +- FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h index 67b2865c9c4..393aa1105bb 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h +++ b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h @@ -605,7 +605,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (NSError *)unsupportedTenantOperationError; -+ (NSError *)blockingCloudFunctionServerResponseWithMessage:(NSString *)response; ++ (NSError *)blockingCloudFunctionServerResponseWithMessage:(nullable NSString *)response; @end diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m index 1d11c4b688e..3a0037aba55 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m +++ b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m @@ -1415,14 +1415,14 @@ + (NSError *)unsupportedTenantOperationError { return [self errorWithCode:FIRAuthInternalErrorCodeUnsupportedTenantOperation]; } -+ (NSError *)blockingCloudFunctionServerResponseWithMessage:(nullable NSString *)response { - if (response == nil) { ++ (NSError *)blockingCloudFunctionServerResponseWithMessage:(nullable NSString *)message { + if (message == nil) { return [self errorWithCode:FIRAuthInternalErrorBlockingCloudFunctionError message:message]; } NSString *jsonString = - [response stringByReplacingOccurrencesOfString:@"HTTP Cloud Function returned an error:" - withString:@""]; + [message stringByReplacingOccurrencesOfString:@"HTTP Cloud Function returned an error:" + withString:@""]; jsonString = [jsonString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; @@ -1436,9 +1436,9 @@ + (NSError *)blockingCloudFunctionServerResponseWithMessage:(nullable NSString * } NSDictionary *errorDict = jsonDict[@"error"]; - NSString *message = errorDict[@"message"]; + NSString *errorMessage = errorDict[@"message"]; - return [self errorWithCode:FIRAuthInternalErrorBlockingCloudFunctionError message:message]; + return [self errorWithCode:FIRAuthInternalErrorBlockingCloudFunctionError message:errorMessage]; } @end From b00e265d4bfb377c95da02a18eb56f3120ecf404 Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Mon, 2 Jan 2023 11:46:27 -0600 Subject: [PATCH 6/8] fixed FIRAuthErrorUtils header --- FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h index 393aa1105bb..2c483a98168 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h +++ b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.h @@ -605,7 +605,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (NSError *)unsupportedTenantOperationError; -+ (NSError *)blockingCloudFunctionServerResponseWithMessage:(nullable NSString *)response; ++ (NSError *)blockingCloudFunctionServerResponseWithMessage:(nullable NSString *)message; @end From 4054884db83d3ffe7bbce3694465a6fb16d8c54b Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Wed, 4 Jan 2023 12:00:52 -0600 Subject: [PATCH 7/8] updated blocking cloud function error code number --- FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h index c282d241914..c84bf84e403 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h @@ -433,7 +433,7 @@ typedef NS_ERROR_ENUM(FIRAuthErrorDomain, FIRAuthErrorCode){ /** Raised when an Cloud Function returns a blocking error. Will include a message returned from * the function. */ - FIRAuthErrorCodeBlockingCloudFunctionError = 18001, + FIRAuthErrorCodeBlockingCloudFunctionError = 17105, } NS_SWIFT_NAME(AuthErrorCode); @end From 7852d7070353ec02d8497a3a10fb4b790bc54028 Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Thu, 5 Jan 2023 11:34:23 -0600 Subject: [PATCH 8/8] moved error to new line --- .../Sources/Public/FirebaseAuth/FIRAuthErrors.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h index c84bf84e403..adef87cd54b 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h @@ -413,6 +413,11 @@ typedef NS_ERROR_ENUM(FIRAuthErrorDomain, FIRAuthErrorCode){ */ FIRAuthErrorCodeMissingOrInvalidNonce = 17094, + /** Raised when an Cloud Function returns a blocking error. Will include a message returned from + * the function. + */ + FIRAuthErrorCodeBlockingCloudFunctionError = 17105, + /** Indicates an error for when the client identifier is missing. */ FIRAuthErrorCodeMissingClientIdentifier = 17993, @@ -429,11 +434,6 @@ typedef NS_ERROR_ENUM(FIRAuthErrorDomain, FIRAuthErrorCode){ describing which step of the JWT parsing process failed. */ FIRAuthErrorCodeMalformedJWT = 18000, - - /** Raised when an Cloud Function returns a blocking error. Will include a message returned from - * the function. - */ - FIRAuthErrorCodeBlockingCloudFunctionError = 17105, } NS_SWIFT_NAME(AuthErrorCode); @end