@@ -1537,11 +1537,11 @@ - (void)revokeTokenWithAuthorizationCode:(NSString *)authorizationCode
1537
1537
completion : (nullable void (^)(NSError *_Nullable error))completion {
1538
1538
[self .currentUser
1539
1539
getIDTokenWithCompletion: ^(NSString *_Nullable idToken, NSError *_Nullable error) {
1540
- if (completion ) {
1541
- if (error ) {
1540
+ if (error ) {
1541
+ if (completion ) {
1542
1542
completion (error);
1543
- return ;
1544
1543
}
1544
+ return ;
1545
1545
}
1546
1546
FIRRevokeTokenRequest *request =
1547
1547
[[FIRRevokeTokenRequest alloc ] initWithToken: authorizationCode
@@ -1703,8 +1703,7 @@ - (void)signInWithPhoneCredential:(FIRPhoneAuthCredential *)credential
1703
1703
@param completion A block which is invoked when the custom token sign in request completes.
1704
1704
*/
1705
1705
- (void )internalSignInAndRetrieveDataWithCustomToken : (NSString *)token
1706
- completion :
1707
- (nullable FIRAuthDataResultCallback)completion {
1706
+ completion : (FIRAuthDataResultCallback)completion {
1708
1707
FIRVerifyCustomTokenRequest *request =
1709
1708
[[FIRVerifyCustomTokenRequest alloc ] initWithToken: token
1710
1709
requestConfiguration: _requestConfiguration];
@@ -1713,18 +1712,16 @@ - (void)internalSignInAndRetrieveDataWithCustomToken:(NSString *)token
1713
1712
callback: ^(FIRVerifyCustomTokenResponse *_Nullable response,
1714
1713
NSError *_Nullable error) {
1715
1714
if (error) {
1716
- if (completion) {
1717
- completion (nil , error);
1718
- return ;
1719
- }
1715
+ completion (nil , error);
1716
+ return ;
1720
1717
}
1721
1718
[self completeSignInWithAccessToken: response.IDToken
1722
1719
accessTokenExpirationDate: response.approximateExpirationDate
1723
1720
refreshToken: response.refreshToken
1724
1721
anonymous: NO
1725
1722
callback: ^(FIRUser *_Nullable user,
1726
1723
NSError *_Nullable error) {
1727
- if (error && completion ) {
1724
+ if (error) {
1728
1725
completion (nil , error);
1729
1726
return ;
1730
1727
}
@@ -1739,9 +1736,7 @@ - (void)internalSignInAndRetrieveDataWithCustomToken:(NSString *)token
1739
1736
initWithUser: user
1740
1737
additionalUserInfo: additonalUserInfo]
1741
1738
: nil ;
1742
- if (completion) {
1743
- completion (result, error);
1744
- }
1739
+ completion (result, error);
1745
1740
}];
1746
1741
}];
1747
1742
}
0 commit comments