3131#import " FirebaseAppCheck/Interop/FIRAppCheckInterop.h"
3232#import " FirebaseAuth/Sources/Auth/FIRAuthGlobalWorkQueue.h"
3333#import " FirebaseAuth/Sources/SystemService/FIRAuthStoredUserManager.h"
34- #import " FirebaseAuth/Sources/User/FIRUser_Internal.h"
3534#import " FirebaseAuth/Sources/Utilities/FIRAuthExceptionUtils.h"
3635
3736#if TARGET_OS_IOS
@@ -302,7 +301,8 @@ @interface FIRAuth () <FIRLibrary, FIRComponentLifecycleMaintainer>
302301/* * @property storedUserManager
303302 @brief The stored user manager.
304303 */
305- @property (nonatomic , strong , nullable ) FIRAuthStoredUserManager *storedUserManager;
304+ // TODO: temporary in FIRAuth.h
305+ // @property(nonatomic, strong, nullable) FIRAuthStoredUserManager *storedUserManager;
306306
307307/* * @fn initWithApp:
308308 @brief Creates a @c FIRAuth instance associated with the provided @c FIRApp instance.
@@ -321,7 +321,8 @@ @implementation FIRAuth {
321321 /* * @var _firebaseAppName
322322 @brief The Firebase app name.
323323 */
324- NSString *_firebaseAppName;
324+ // TODO: temporary in FIRAuth.h
325+ // NSString *_firebaseAppName;
325326
326327 /* * @var _listenerHandles
327328 @brief Handles returned from @c NSNotificationCenter for blocks which are "auth state did
@@ -333,7 +334,8 @@ @implementation FIRAuth {
333334 /* * @var _keychainServices
334335 @brief The keychain service.
335336 */
336- id <FIRAuthStorage> _keychainServices;
337+ // TODO: temporary in FIRAuth.h
338+ // FIRAuthKeychainServices *_keychainServices;
337339
338340 /* * @var _lastNotifiedUserToken
339341 @brief The user access (ID) token used last time for posting auth state changed notification.
@@ -599,6 +601,10 @@ - (nullable FIRUser *)currentUser {
599601 return result;
600602}
601603
604+ - (nullable FIRUser *)rawCurrentUser {
605+ return self->_currentUser ;
606+ }
607+
602608- (void )signInWithProvider : (id <FIRFederatedAuthProvider>)provider
603609 UIDelegate : (nullable id <FIRAuthUIDelegate>)UIDelegate
604610 completion : (nullable FIRAuthDataResultCallback)completion {
@@ -944,7 +950,7 @@ - (void)internalSignInAndRetrieveDataWithCredential:(FIRAuthCredential *)credent
944950 }
945951
946952 [self
947- completeSignInWithAccessToken: response.idToken
953+ completeSignInWithAccessToken: response.IDToken
948954 accessTokenExpirationDate: response.approximateExpirationDate
949955 refreshToken: response.refreshToken
950956 anonymous: NO
@@ -1014,7 +1020,7 @@ - (void)internalSignInAndRetrieveDataWithCredential:(FIRAuthCredential *)credent
10141020 return ;
10151021 }
10161022 [self
1017- completeSignInWithAccessToken: response.idToken
1023+ completeSignInWithAccessToken: response.IDToken
10181024 accessTokenExpirationDate: response.approximateExpirationDate
10191025 refreshToken: response.refreshToken
10201026 anonymous: NO
@@ -1048,7 +1054,7 @@ - (void)signInAnonymouslyWithCompletion:(nullable FIRAuthDataResultCallback)comp
10481054 dispatch_async (FIRAuthGlobalWorkQueue (), ^{
10491055 FIRAuthDataResultCallback decoratedCallback =
10501056 [self signInFlowAuthDataResultCallbackByDecoratingCallback: completion];
1051- if (self->_currentUser .anonymous ) {
1057+ if (self->_currentUser .isAnonymous ) {
10521058 FIRAuthDataResult *result = [[FIRAuthDataResult alloc ] initWithUser: self ->_currentUser
10531059 additionalUserInfo: nil
10541060 credential: nil ];
@@ -1685,7 +1691,7 @@ - (void)internalSignInAndRetrieveDataWithCustomToken:(NSString *)token
16851691 return ;
16861692 }
16871693 }
1688- [self completeSignInWithAccessToken: response.idToken
1694+ [self completeSignInWithAccessToken: response.IDToken
16891695 accessTokenExpirationDate: response.approximateExpirationDate
16901696 refreshToken: response.refreshToken
16911697 anonymous: NO
@@ -1784,19 +1790,6 @@ - (void)possiblyPostAuthStateChangeNotification {
17841790 });
17851791}
17861792
1787- - (BOOL )updateKeychainWithUser : (FIRUser *)user error : (NSError *_Nullable *_Nullable)error {
1788- if (user != _currentUser) {
1789- // No-op if the user is no longer signed in. This is not considered an error as we don't check
1790- // whether the user is still current on other callbacks of user operations either.
1791- return YES ;
1792- }
1793- if ([self saveUser: user error: error]) {
1794- [self possiblyPostAuthStateChangeNotification ];
1795- return YES ;
1796- }
1797- return NO ;
1798- }
1799-
18001793+ (NSString *)keychainServiceNameForAppID : (NSString *)appID {
18011794 return [@" firebase_auth_" stringByAppendingString: appID];
18021795}
0 commit comments