diff options
Diffstat (limited to 'Firebase/Auth')
-rw-r--r-- | Firebase/Auth/Source/FIRAuthWebUtils.h | 15 | ||||
-rw-r--r-- | Firebase/Auth/Source/FIRAuthWebUtils.m | 36 |
2 files changed, 2 insertions, 49 deletions
diff --git a/Firebase/Auth/Source/FIRAuthWebUtils.h b/Firebase/Auth/Source/FIRAuthWebUtils.h index fe1c29a..85b843f 100644 --- a/Firebase/Auth/Source/FIRAuthWebUtils.h +++ b/Firebase/Auth/Source/FIRAuthWebUtils.h @@ -45,19 +45,6 @@ typedef void (^FIRFetchAuthDomainCallback)(NSString *_Nullable authDomain, */ + (BOOL)isCallbackSchemeRegisteredForCustomURLScheme:(NSString *)URLScheme; -/** @fn isExpectedCallbackURL:eventID:authType - @brief Parses a URL into all available query items. - @param URL The actual callback URL. - @param eventID The expected event ID. - @param authType The expected auth type. - @param callbackScheme The expected callback custom scheme. - @return Whether or not the actual callback URL matches the expected callback URL. - */ -+ (BOOL)isExpectedCallbackURL:(nullable NSURL *)URL - eventID:(NSString *)eventID - authType:(NSString *)authType - callbackScheme:(NSString *)callbackScheme; - /** @fn fetchAuthDomainWithCompletion:completion: @brief Fetches the auth domain associated with the Firebase Project. @param completion The callback invoked after the auth domain has been constructed or an error @@ -77,4 +64,4 @@ typedef void (^FIRFetchAuthDomainCallback)(NSString *_Nullable authDomain, @end -NS_ASSUME_NONNULL_END
\ No newline at end of file +NS_ASSUME_NONNULL_END diff --git a/Firebase/Auth/Source/FIRAuthWebUtils.m b/Firebase/Auth/Source/FIRAuthWebUtils.m index d694a06..398914b 100644 --- a/Firebase/Auth/Source/FIRAuthWebUtils.m +++ b/Firebase/Auth/Source/FIRAuthWebUtils.m @@ -16,8 +16,6 @@ #import "FIRAuthWebUtils.h" -#import <GoogleToolboxForMac/GTMNSDictionary+URLArguments.h> - #import "FIRAuthBackend.h" #import "FIRAuthErrorUtils.h" #import "FIRGetProjectConfigRequest.h" @@ -53,38 +51,6 @@ static NSString *const kAuthDomainSuffix = @"firebaseapp.com"; return NO; } -+ (BOOL)isExpectedCallbackURL:(NSURL *)URL - eventID:(NSString *)eventID - authType:(NSString *)authType - callbackScheme:(NSString *)callbackScheme { - if (!URL) { - return NO; - } - NSURLComponents *actualURLComponents = - [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:NO]; - actualURLComponents.query = nil; - actualURLComponents.fragment = nil; - - NSURLComponents *expectedURLComponents = [NSURLComponents new]; - expectedURLComponents.scheme = callbackScheme; - expectedURLComponents.host = @"firebaseauth"; - expectedURLComponents.path = @"/link"; - - if (!([[expectedURLComponents URL] isEqual:[actualURLComponents URL]])) { - return NO; - } - NSDictionary<NSString *, NSString *> *URLQueryItems = - [NSDictionary gtm_dictionaryWithHttpArgumentsString:URL.query]; - NSURL *deeplinkURL = [NSURL URLWithString:URLQueryItems[@"deep_link_id"]]; - NSDictionary<NSString *, NSString *> *deeplinkQueryItems = - [NSDictionary gtm_dictionaryWithHttpArgumentsString:deeplinkURL.query]; - if ([deeplinkQueryItems[@"authType"] isEqualToString:authType] && - [deeplinkQueryItems[@"eventId"] isEqualToString:eventID]) { - return YES; - } - return NO; -} - + (void)fetchAuthDomainWithRequestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration completion:(FIRFetchAuthDomainCallback)completion { FIRGetProjectConfigRequest *request = @@ -131,4 +97,4 @@ static NSString *const kAuthDomainSuffix = @"firebaseapp.com"; return nil; } -@end
\ No newline at end of file +@end |