Skip to content

Commit f151178

Browse files
authored
Revert "Add supporting of custom fdl domain" (#1828)
1 parent e2501f8 commit f151178

9 files changed

+0
-78
lines changed

Example/Auth/Tests/FIRGetOOBConfirmationCodeRequestTests.m

-14
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,6 @@
126126
*/
127127
static NSString *const kCanHandleCodeInAppKey = @"canHandleCodeInApp";
128128

129-
/** @var kDynamicLinkDomainKey
130-
@brief The key for the "dynamic link domain" value in the request.
131-
*/
132-
static NSString *const kDynamicLinkDomainKey = @"dynamicLinkDomain";
133-
134-
/** @var kDynamicLinkDomain
135-
@brief Fake dynamic link domain for testing.
136-
*/
137-
static NSString *const kDynamicLinkDomain = @"test.page.link";
138-
139129
/** @class FIRGetOOBConfirmationCodeRequestTests
140130
@brief Tests for @c FIRGetOOBConfirmationCodeRequest.
141131
*/
@@ -204,7 +194,6 @@ - (void)testPasswordResetRequest {
204194
[NSNumber numberWithBool:YES]);
205195
XCTAssertEqualObjects(_RPCIssuer.decodedRequest[kCanHandleCodeInAppKey],
206196
[NSNumber numberWithBool:YES]);
207-
XCTAssertEqualObjects(_RPCIssuer.decodedRequest[kDynamicLinkDomainKey], kDynamicLinkDomain);
208197
}
209198

210199
/** @fn testSignInWithEmailLinkRequest
@@ -241,7 +230,6 @@ - (void)testSignInWithEmailLinkRequest {
241230
[NSNumber numberWithBool:YES]);
242231
XCTAssertEqualObjects(_RPCIssuer.decodedRequest[kCanHandleCodeInAppKey],
243232
[NSNumber numberWithBool:YES]);
244-
XCTAssertEqualObjects(_RPCIssuer.decodedRequest[kDynamicLinkDomainKey], kDynamicLinkDomain);
245233
}
246234

247235

@@ -280,7 +268,6 @@ - (void)testEmailVerificationRequest {
280268
[NSNumber numberWithBool:YES]);
281269
XCTAssertEqualObjects(_RPCIssuer.decodedRequest[kCanHandleCodeInAppKey],
282270
[NSNumber numberWithBool:YES]);
283-
XCTAssertEqualObjects(_RPCIssuer.decodedRequest[kDynamicLinkDomainKey], kDynamicLinkDomain);
284271
}
285272

286273
#pragma mark - Helpers
@@ -297,7 +284,6 @@ - (FIRActionCodeSettings *)fakeActionCodeSettings {
297284
minimumVersion:kAndroidMinimumVersion];
298285
actionCodeSettings.handleCodeInApp = YES;
299286
actionCodeSettings.URL = [NSURL URLWithString:kContinueURL];
300-
actionCodeSettings.dynamicLinkDomain = kDynamicLinkDomain;
301287
return actionCodeSettings;
302288
}
303289

Firebase/Auth/Source/FIRAuthErrorUtils.h

-7
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,6 @@ NS_ASSUME_NONNULL_BEGIN
501501
*/
502502
+ (NSError *)nullUserErrorWithMessage:(nullable NSString *)message;
503503

504-
/** @fn invalidDynamicLinkDomainErrorWithMessage:
505-
@brief Constructs an @c NSError with the code and message provided.
506-
@param message Error message from the backend, if any.
507-
@return The nullable NSError instance associated with the given error message, if one is found.
508-
*/
509-
+ (NSError *)invalidDynamicLinkDomainErrorWithMessage:(nullable NSString *)message;
510-
511504
/** @fn keychainErrorWithFunction:status:
512505
@brief Constructs an @c NSError with the @c FIRAuthErrorCodeKeychainError code.
513506
@param keychainFunction The keychain function which was invoked and yielded an unexpected

Firebase/Auth/Source/FIRAuthErrorUtils.m

-15
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,6 @@
407407
static NSString *const kFIRAuthErrorMessageNullUser = @"A null user object was provided as the "
408408
"argument for an operation which requires a non-null user object.";
409409

410-
/** @var kFIRAuthErrorMessageInvalidDynamicLinkDomain
411-
@brief Message for @c kFIRAuthErrorMessageInvalidDynamicLinkDomain error code.
412-
*/
413-
static NSString *const kFIRAuthErrorMessageInvalidDynamicLinkDomain = @"The "
414-
"Firebase Dynamic Link domain used is either not configured or is unauthorized "
415-
"for the current project.";
416-
417410
/** @var kFIRAuthErrorMessageInternalError
418411
@brief Message for @c FIRAuthErrorCodeInternalError error code.
419412
*/
@@ -542,8 +535,6 @@
542535
return kFIRAuthErrorMessageWebRequestFailed;
543536
case FIRAuthErrorCodeNullUser:
544537
return kFIRAuthErrorMessageNullUser;
545-
case FIRAuthErrorCodeInvalidDynamicLinkDomain:
546-
return kFIRAuthErrorMessageInvalidDynamicLinkDomain;
547538
case FIRAuthErrorCodeWebInternalError:
548539
return kFIRAuthErrorMessageWebInternalError;
549540
case FIRAuthErrorCodeMalformedJWT:
@@ -667,8 +658,6 @@
667658
return @"ERROR_WEB_NETWORK_REQUEST_FAILED";
668659
case FIRAuthErrorCodeNullUser:
669660
return @"ERROR_NULL_USER";
670-
case FIRAuthErrorCodeInvalidDynamicLinkDomain:
671-
return @"ERROR_INVALID_DYNAMIC_LINK_DOMAIN";
672661
case FIRAuthErrorCodeWebInternalError:
673662
return @"ERROR_WEB_INTERNAL_ERROR";
674663
case FIRAuthErrorCodeMalformedJWT:
@@ -1030,10 +1019,6 @@ + (NSError *)nullUserErrorWithMessage:(nullable NSString *)message {
10301019
return [self errorWithCode:FIRAuthInternalErrorCodeNullUser message:message];
10311020
}
10321021

1033-
+ (NSError *)invalidDynamicLinkDomainErrorWithMessage:(nullable NSString *)message {
1034-
return [self errorWithCode:FIRAuthInternalErrorCodeInvalidDynamicLinkDomain message:message];
1035-
}
1036-
10371022
+ (NSError *)keychainErrorWithFunction:(NSString *)keychainFunction status:(OSStatus)status {
10381023
NSString *failureReason = [NSString stringWithFormat:@"%@ (%li)", keychainFunction, (long)status];
10391024
return [self errorWithCode:FIRAuthInternalErrorCodeKeychainError userInfo:@{

Firebase/Auth/Source/FIRAuthInternalErrors.h

-6
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,6 @@ typedef NS_ENUM(NSInteger, FIRAuthInternalErrorCode) {
376376
FIRAuthInternalErrorCodeNullUser =
377377
FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeNullUser,
378378

379-
/** Indicates that the Firebase Dynamic Link domain used is either not configured or is unauthorized
380-
for the current project.
381-
*/
382-
FIRAuthInternalErrorCodeInvalidDynamicLinkDomain =
383-
FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeInvalidDynamicLinkDomain,
384-
385379
FIRAuthInternalErrorCodeMalformedJWT =
386380
FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeMalformedJWT,
387381

Firebase/Auth/Source/Public/FIRActionCodeSettings.h

-5
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@
5959
*/
6060
@property(nonatomic, assign, readonly) BOOL androidInstallIfNotAvailable;
6161

62-
/** @property dynamicLinkDomain
63-
@brief The Firebase Dynamic Link domain used for out of band code flow.
64-
*/
65-
@property (copy, nonatomic, nullable) NSString *dynamicLinkDomain;
66-
6762
/** @fn setIOSBundleID
6863
@brief Sets the iOS bundle Id.
6964
@param iOSBundleID The iOS bundle ID.

Firebase/Auth/Source/Public/FIRAuthErrors.h

-5
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,6 @@ typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
304304
*/
305305
FIRAuthErrorCodeNullUser = 17067,
306306

307-
/** Indicates that the Firebase Dynamic Link domain used is either not configured or is unauthorized
308-
for the current project.
309-
*/
310-
FIRAuthErrorCodeInvalidDynamicLinkDomain = 17074,
311-
312307
/** Indicates an error occurred while attempting to access the keychain.
313308
*/
314309
FIRAuthErrorCodeKeychainError = 17995,

Firebase/Auth/Source/RPCs/FIRAuthBackend.m

-10
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,6 @@
284284
*/
285285
static NSString *const kUnauthorizedDomainErrorMessage = @"UNAUTHORIZED_DOMAIN";
286286

287-
/** @var kInvalidDynamicLinkDomainErrorMessage
288-
@brief This is the error message the server will respond with if the dynamic link domain provided
289-
in the request is invalid.
290-
*/
291-
static NSString *const kInvalidDynamicLinkDomainErrorMessage = @"INVALID_DYNAMIC_LINK_DOMAIN";
292-
293287
/** @var kInvalidContinueURIErrorMessage
294288
@brief This is the error message the server will respond with if the continue URL provided in
295289
the request is invalid.
@@ -1050,10 +1044,6 @@ + (nullable NSError *)clientErrorWithServerErrorMessage:(NSString *)serverErrorM
10501044
return [FIRAuthErrorUtils invalidContinueURIErrorWithMessage:serverDetailErrorMessage];
10511045
}
10521046

1053-
if ([shortErrorMessage isEqualToString:kInvalidDynamicLinkDomainErrorMessage]) {
1054-
return [FIRAuthErrorUtils invalidDynamicLinkDomainErrorWithMessage:serverDetailErrorMessage];
1055-
}
1056-
10571047
if ([shortErrorMessage isEqualToString:kMissingContinueURIErrorMessage]) {
10581048
return [FIRAuthErrorUtils missingContinueURIErrorWithMessage:serverDetailErrorMessage];
10591049
}

Firebase/Auth/Source/RPCs/FIRGetOOBConfirmationCodeRequest.h

-6
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ typedef NS_ENUM(NSInteger, FIRGetOOBConfirmationCodeRequestType) {
9696
*/
9797
@property(assign, nonatomic) BOOL handleCodeInApp;
9898

99-
/** @property dynamicLinkDomain
100-
@brief The Firebase Dynamic Link domain used for out of band code flow.
101-
*/
102-
@property (copy, nonatomic, nullable) NSString *dynamicLinkDomain;
103-
104-
10599
/** @fn passwordResetRequestWithEmail:actionCodeSettings:requestConfiguration:
106100
@brief Creates a password reset request.
107101
@param email The user's email address.

Firebase/Auth/Source/RPCs/FIRGetOOBConfirmationCodeRequest.m

-10
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@
7474
*/
7575
static NSString *const kCanHandleCodeInAppKey = @"canHandleCodeInApp";
7676

77-
/** @var kDynamicLinkDomainKey
78-
@brief The key for the "dynamic link domain" value in the request.
79-
*/
80-
static NSString *const kDynamicLinkDomainKey = @"dynamicLinkDomain";
81-
8277
/** @var kPasswordResetRequestTypeValue
8378
@brief The value for the "PASSWORD_RESET" request type.
8479
*/
@@ -182,7 +177,6 @@ - (nullable instancetype)initWithRequestType:(FIRGetOOBConfirmationCodeRequestTy
182177
_androidMinimumVersion = actionCodeSettings.androidMinimumVersion;
183178
_androidInstallApp = actionCodeSettings.androidInstallIfNotAvailable;
184179
_handleCodeInApp = actionCodeSettings.handleCodeInApp;
185-
_dynamicLinkDomain = actionCodeSettings.dynamicLinkDomain;
186180
}
187181
return self;
188182
}
@@ -234,10 +228,6 @@ - (nullable id)unencodedHTTPRequestBodyWithError:(NSError *_Nullable *_Nullable)
234228
body[kCanHandleCodeInAppKey] = @YES;
235229
}
236230

237-
if (_dynamicLinkDomain) {
238-
body[kDynamicLinkDomainKey] = _dynamicLinkDomain;
239-
}
240-
241231
return body;
242232
}
243233

0 commit comments

Comments
 (0)