Skip to content

Commit 954484c

Browse files
authored
Removes canHandleURL from FIRAuthInternal (#235)
* Removes canHandleURL from FIRAuthInternal Removes canHandleURL from FIRAuth_Internal and makes small modification to FIRPhoneAuthProvider unit test. * Addresses comment
1 parent dafdf26 commit 954484c

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

Example/Auth/Tests/FIRPhoneAuthProviderTests.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,10 @@ - (void)testVerifyPhoneNumberUIDelegate {
314314
NSMutableString *fakeRedirectURLString =
315315
[NSMutableString stringWithString:kFakeRedirectURLStringWithoutReCAPTCHAToken];
316316
[fakeRedirectURLString appendString:kFakeReCAPTCHAToken];
317-
[[_mockAuth authURLPresenter] canHandleURL:[NSURL URLWithString:fakeRedirectURLString]];
317+
OCMExpect([_mockAuth canHandleURL:OCMOCK_ANY]).andDo(^(NSInvocation *invocation) {
318+
[[_mockAuth authURLPresenter] canHandleURL:[NSURL URLWithString:fakeRedirectURLString]];
319+
});
320+
[_mockAuth canHandleURL:[NSURL URLWithString:fakeRedirectURLString]];
318321
});
319322
// Expect view controller dismissal by UIDelegate.
320323
OCMExpect([mockUIDelegate dismissViewControllerAnimated:OCMOCK_ANY completion:OCMOCK_ANY]).

Firebase/Auth/Source/FIRAuth_Internal.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,6 @@ NS_ASSUME_NONNULL_BEGIN
124124
*/
125125
- (BOOL)signOutByForceWithUserID:(NSString *)userID error:(NSError *_Nullable *_Nullable)error;
126126

127-
/** @fn canHandleURL:
128-
@brief Whether the specific URL is handled by @c FIRAuth .
129-
@param url The URL received by the application delegate from any of the openURL method.
130-
@return Whether or the URL is handled. YES means the URL is for Firebase Auth
131-
so the caller should ignore the URL from further processing, and NO means the
132-
the URL is for the app (or another libaray) so the caller should continue handling
133-
this URL as usual.
134-
@remarks If swizzling is disabled, URLs received by the application delegate must be forwarded
135-
to this method for phone number auth to work.
136-
*/
137-
- (BOOL)canHandleURL:(nonnull NSURL *)url;
138-
139127
@end
140128

141129
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)