From 79811effb9904e9625b5c610c57c9fed1bbf8d94 Mon Sep 17 00:00:00 2001 From: Zsika Phillip Date: Thu, 26 Apr 2018 06:38:54 -0700 Subject: Removes deprecated getToken APIs (#1188) --- Firebase/Auth/Source/FIRUser.m | 11 +---------- Firebase/Auth/Source/Public/FIRUser.h | 28 ---------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) (limited to 'Firebase') diff --git a/Firebase/Auth/Source/FIRUser.m b/Firebase/Auth/Source/FIRUser.m index ea48267..04aa861 100644 --- a/Firebase/Auth/Source/FIRUser.m +++ b/Firebase/Auth/Source/FIRUser.m @@ -776,15 +776,11 @@ static void callInMainThreadWithAuthDataResultAndError( } - (void)getIDTokenWithCompletion:(nullable FIRAuthTokenCallback)completion { - // |getTokenForcingRefresh:completion:| is also a public API so there is no need to dispatch to + // |getIDTokenForcingRefresh:completion:| is also a public API so there is no need to dispatch to // global work queue here. [self getIDTokenForcingRefresh:NO completion:completion]; } -- (void)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion { - [self getIDTokenWithCompletion:completion]; -} - - (void)getIDTokenForcingRefresh:(BOOL)forceRefresh completion:(nullable FIRAuthTokenCallback)completion { [self getIDTokenResultForcingRefresh:forceRefresh @@ -898,11 +894,6 @@ static void callInMainThreadWithAuthDataResultAndError( return result; } -- (void)getTokenForcingRefresh:(BOOL)forceRefresh - completion:(nullable FIRAuthTokenCallback)completion { - [self getIDTokenForcingRefresh:forceRefresh completion:completion]; -} - /** @fn internalGetTokenForcingRefresh:callback: @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. @param callback The block to invoke when the token is available. Invoked asynchronously on the diff --git a/Firebase/Auth/Source/Public/FIRUser.h b/Firebase/Auth/Source/Public/FIRUser.h index dd8362d..1c7af7a 100644 --- a/Firebase/Auth/Source/Public/FIRUser.h +++ b/Firebase/Auth/Source/Public/FIRUser.h @@ -305,17 +305,6 @@ NS_SWIFT_NAME(User) - (void)getIDTokenWithCompletion:(nullable FIRAuthTokenCallback)completion NS_SWIFT_NAME(getIDToken(completion:)); -/** @fn getTokenWithCompletion: - @brief Please use `getIDTokenWithCompletion:` instead. - - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion - NS_SWIFT_NAME(getToken(completion:)) __attribute__((deprecated)); - /** @fn getIDTokenForcingRefresh:completion: @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. @@ -332,23 +321,6 @@ NS_SWIFT_NAME(User) - (void)getIDTokenForcingRefresh:(BOOL)forceRefresh completion:(nullable FIRAuthTokenCallback)completion; -/** @fn getTokenForcingRefresh:completion: - @brief Please use getIDTokenForcingRefresh:completion instead. - - @param forceRefresh Forces a token refresh. Useful if the token becomes invalid for some reason - other than an expiration. - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks The authentication token will be refreshed (by making a network request) if it has - expired, or if `forceRefresh` is YES. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)getTokenForcingRefresh:(BOOL)forceRefresh - completion:(nullable FIRAuthTokenCallback)completion - __attribute__((deprecated)); - /** @fn linkWithCredential:completion: @brief Convenience method for `linkAndRetrieveDataWithCredential:completion:` This method doesn't return additional identity provider data. -- cgit v1.2.3