diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthWebUtils.m b/FirebaseAuth/Sources/Utilities/FIRAuthWebUtils.m index 500623c838d..5e33b985794 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthWebUtils.m +++ b/FirebaseAuth/Sources/Utilities/FIRAuthWebUtils.m @@ -119,7 +119,7 @@ + (void)fetchAuthDomainWithRequestConfiguration:(FIRAuthRequestConfiguration *)r } if (!isCustomAuthDomainAuthorized) { NSError *customDomainError = [FIRAuthErrorUtils - unauthorizedDomainErrorWithMessage:@"Custom domain is not authorized."]; + unauthorizedDomainErrorWithMessage:@"Error while validating application identity: The configured custom domain is not allowlisted."]; completion(nil, customDomainError); return; } diff --git a/FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.h b/FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.h index 0a106d7d948..d4f2c415f48 100644 --- a/FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.h +++ b/FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)signInAnonymouslyWithCallback:(nullable FIRAuthDataResultCallback)callback; --(void)setCustomAuthDomain; +-(void)setAuthDomain; @end diff --git a/FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.m b/FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.m index d87970b8be4..34c77f76ff8 100644 --- a/FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.m +++ b/FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.m @@ -32,8 +32,8 @@ - (StaticContentTableViewSection *)authSection { action:^{ [weakSelf signOut]; }], [StaticContentTableViewCell cellWithTitle:@"Initialize Recaptcha Config" action:^{ [weakSelf initializeRecaptchaConfig]; }], - [StaticContentTableViewCell cellWithTitle:@"Set Custom Auth Domain" - action:^{ [weakSelf setCustomAuthDomain]; }] + [StaticContentTableViewCell cellWithTitle:@"Set Auth Domain" + action:^{ [weakSelf setAuthDomain]; }] ]]; } @@ -86,16 +86,17 @@ - (void)initializeRecaptchaConfig { }]; } -- (void)setCustomAuthDomain { - [self showTextInputPromptWithMessage:@"Custom Auth Domain:" +- (void)setAuthDomain { + [self showTextInputPromptWithMessage:@"Auth Domain:" completionBlock:^(BOOL userPressedOK, NSString *_Nullable customAuthDomain) { if (userPressedOK && customAuthDomain.length) { FIRAuth *auth = [AppManager auth]; if(!auth) { + [self logFailedTest:@"Could not obtain auth object."]; return; } auth.customAuthDomain = customAuthDomain; - NSLog(@"Custom Auth Domain: %@", customAuthDomain); + [self logSuccess:[NSString stringWithFormat:@"Successfully set auth domain to: %@", customAuthDomain]]; } return; }];