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.
@@ -586,6 +588,10 @@ - (nullable FIRUser *)currentUser {
586588 return result;
587589}
588590
591+ - (nullable FIRUser *)rawCurrentUser {
592+ return self->_currentUser ;
593+ }
594+
589595- (void )signInWithProvider : (id <FIRFederatedAuthProvider>)provider
590596 UIDelegate : (nullable id <FIRAuthUIDelegate>)UIDelegate
591597 completion : (nullable FIRAuthDataResultCallback)completion {
@@ -931,7 +937,7 @@ - (void)internalSignInAndRetrieveDataWithCredential:(FIRAuthCredential *)credent
931937 }
932938
933939 [self
934- completeSignInWithAccessToken: response.idToken
940+ completeSignInWithAccessToken: response.IDToken
935941 accessTokenExpirationDate: response.approximateExpirationDate
936942 refreshToken: response.refreshToken
937943 anonymous: NO
@@ -1001,7 +1007,7 @@ - (void)internalSignInAndRetrieveDataWithCredential:(FIRAuthCredential *)credent
10011007 return ;
10021008 }
10031009 [self
1004- completeSignInWithAccessToken: response.idToken
1010+ completeSignInWithAccessToken: response.IDToken
10051011 accessTokenExpirationDate: response.approximateExpirationDate
10061012 refreshToken: response.refreshToken
10071013 anonymous: NO
@@ -1035,7 +1041,7 @@ - (void)signInAnonymouslyWithCompletion:(nullable FIRAuthDataResultCallback)comp
10351041 dispatch_async (FIRAuthGlobalWorkQueue (), ^{
10361042 FIRAuthDataResultCallback decoratedCallback =
10371043 [self signInFlowAuthDataResultCallbackByDecoratingCallback: completion];
1038- if (self->_currentUser .anonymous ) {
1044+ if (self->_currentUser .isAnonymous ) {
10391045 FIRAuthDataResult *result = [[FIRAuthDataResult alloc ] initWithUser: self ->_currentUser
10401046 additionalUserInfo: nil
10411047 credential: nil ];
@@ -1672,7 +1678,7 @@ - (void)internalSignInAndRetrieveDataWithCustomToken:(NSString *)token
16721678 return ;
16731679 }
16741680 }
1675- [self completeSignInWithAccessToken: response.idToken
1681+ [self completeSignInWithAccessToken: response.IDToken
16761682 accessTokenExpirationDate: response.approximateExpirationDate
16771683 refreshToken: response.refreshToken
16781684 anonymous: NO
@@ -1771,19 +1777,6 @@ - (void)possiblyPostAuthStateChangeNotification {
17711777 });
17721778}
17731779
1774- - (BOOL )updateKeychainWithUser : (FIRUser *)user error : (NSError *_Nullable *_Nullable)error {
1775- if (user != _currentUser) {
1776- // No-op if the user is no longer signed in. This is not considered an error as we don't check
1777- // whether the user is still current on other callbacks of user operations either.
1778- return YES ;
1779- }
1780- if ([self saveUser: user error: error]) {
1781- [self possiblyPostAuthStateChangeNotification ];
1782- return YES ;
1783- }
1784- return NO ;
1785- }
1786-
17871780+ (NSString *)keychainServiceNameForAppID : (NSString *)appID {
17881781 return [@" firebase_auth_" stringByAppendingString: appID];
17891782}
0 commit comments