Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
pragatimodi committed Sep 21, 2023
1 parent 7d6d786 commit fc69d75
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion FirebaseAuth/Sources/Utilities/FIRAuthWebUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN

- (void)signInAnonymouslyWithCallback:(nullable FIRAuthDataResultCallback)callback;

-(void)setCustomAuthDomain;
-(void)setAuthDomain;

@end

Expand Down
11 changes: 6 additions & 5 deletions FirebaseAuth/Tests/Sample/Sample/MainViewController+Auth.m
Original file line number Diff line number Diff line change
Expand Up @@ -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]; }]
]];
}

Expand Down Expand Up @@ -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;
}];
Expand Down

0 comments on commit fc69d75

Please sign in to comment.