aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Xiangtian Dai <xiangtian@google.com>2017-10-09 16:20:17 -0700
committerGravatar GitHub <noreply@github.com>2017-10-09 16:20:17 -0700
commit532f538ee65a931b80203e7a8abb5ebf22cfad5a (patch)
treecc01e10b3184d13f72d1f81f05f5b3b57331fa32
parentde481f78f0263281c78522f4af2688a1414932f9 (diff)
Prepare to release FirebaseAuth 4.3.0 (#345)
* Update Auth version to 4.3.0 * Revert "Removes user meta from public API (#308)" This reverts commit 1602391bf8a9b6d3247716e3bf7b9f27dec8d2b6. * Revert "Removes metadata from swift sample (#318)" This reverts commit 804ff523a20072fb958e9137c76b9c0e14dda870.
-rw-r--r--Example/Auth/Sample/UserInfoViewController.m2
-rw-r--r--Example/Auth/SwiftSample/Stubs.swift3
-rw-r--r--Firebase/Auth/CHANGELOG.md3
-rw-r--r--Firebase/Auth/FirebaseAuth.podspec2
-rw-r--r--Firebase/Auth/Source/FIRUser_Internal.h5
-rw-r--r--Firebase/Auth/Source/Public/FIRUser.h5
-rw-r--r--Firebase/Auth/Source/Public/FIRUserMetadata.h (renamed from Firebase/Auth/Source/FIRUserMetadata.h)3
-rw-r--r--Firebase/Auth/Source/Public/FirebaseAuth.h1
8 files changed, 17 insertions, 7 deletions
diff --git a/Example/Auth/Sample/UserInfoViewController.m b/Example/Auth/Sample/UserInfoViewController.m
index 60a3e4c..6866d29 100644
--- a/Example/Auth/Sample/UserInfoViewController.m
+++ b/Example/Auth/Sample/UserInfoViewController.m
@@ -16,7 +16,7 @@
#import "UserInfoViewController.h"
-#import "FIRUser_Internal.h"
+#import "FIRUser.h"
#import "FIRUserInfo.h"
#import "FIRUserMetadata.h"
#import "StaticContentTableViewManager.h"
diff --git a/Example/Auth/SwiftSample/Stubs.swift b/Example/Auth/SwiftSample/Stubs.swift
index 4ba555d..4f4ccc0 100644
--- a/Example/Auth/SwiftSample/Stubs.swift
+++ b/Example/Auth/SwiftSample/Stubs.swift
@@ -48,5 +48,8 @@ func metadataStubs() {
let credential = OAuthProvider.credential(withProviderID: "fake", accessToken: "none")
Auth.auth().signInAndRetrieveData(with: credential) { result, error in
let _: Bool? = result!.additionalUserInfo!.isNewUser
+ let metadata: UserMetadata = result!.user.metadata
+ let _: Date? = metadata.lastSignInDate
+ let _: Date? = metadata.creationDate
}
}
diff --git a/Firebase/Auth/CHANGELOG.md b/Firebase/Auth/CHANGELOG.md
index 3a659e4..483852d 100644
--- a/Firebase/Auth/CHANGELOG.md
+++ b/Firebase/Auth/CHANGELOG.md
@@ -1,3 +1,6 @@
+# v4.3.0
+- Provides account creation and last sign-in dates as metadata to the user object.
+
# v4.2.1
- Fixes a threading issue in phone number auth that completion block was not
executed on the main thread in some error cases.
diff --git a/Firebase/Auth/FirebaseAuth.podspec b/Firebase/Auth/FirebaseAuth.podspec
index f8e708f..148ff90 100644
--- a/Firebase/Auth/FirebaseAuth.podspec
+++ b/Firebase/Auth/FirebaseAuth.podspec
@@ -4,7 +4,7 @@
Pod::Spec.new do |s|
s.name = 'FirebaseAuth'
- s.version = '4.2.1'
+ s.version = '4.3.0'
s.summary = 'Firebase Open Source Libraries for iOS.'
s.description = <<-DESC
diff --git a/Firebase/Auth/Source/FIRUser_Internal.h b/Firebase/Auth/Source/FIRUser_Internal.h
index 9e26301..9a069bb 100644
--- a/Firebase/Auth/Source/FIRUser_Internal.h
+++ b/Firebase/Auth/Source/FIRUser_Internal.h
@@ -47,11 +47,6 @@ typedef void(^FIRRetrieveUserCallback)(FIRUser *_Nullable user, NSError *_Nullab
*/
@property(nonatomic, copy, readonly) NSDate *accessTokenExpirationDate;
-/** @property metadata
- @brief Metadata associated with the Firebase user in question.
- */
-@property(nonatomic, readonly, nonnull) FIRUserMetadata *metadata;
-
/** @fn retrieveUserWithAuth:accessToken:accessTokenExpirationDate:refreshToken:callback:
@brief Constructs a user with Secure Token Service tokens, and obtains user details from the
getAccountInfo endpoint.
diff --git a/Firebase/Auth/Source/Public/FIRUser.h b/Firebase/Auth/Source/Public/FIRUser.h
index ecbbd8c..f0a5619 100644
--- a/Firebase/Auth/Source/Public/FIRUser.h
+++ b/Firebase/Auth/Source/Public/FIRUser.h
@@ -85,6 +85,11 @@ FIR_SWIFT_NAME(User)
*/
@property(nonatomic, readonly, nonnull) NSArray<id<FIRUserInfo>> *providerData;
+/** @property metadata
+ @brief Metadata associated with the Firebase user in question.
+ */
+@property(nonatomic, readonly, nonnull) FIRUserMetadata *metadata;
+
/** @fn init
@brief This class should not be instantiated.
@remarks To retrieve the current user, use @c FIRAuth.currentUser. To sign a user
diff --git a/Firebase/Auth/Source/FIRUserMetadata.h b/Firebase/Auth/Source/Public/FIRUserMetadata.h
index a93b148..1b72ee1 100644
--- a/Firebase/Auth/Source/FIRUserMetadata.h
+++ b/Firebase/Auth/Source/Public/FIRUserMetadata.h
@@ -16,11 +16,14 @@
#import <Foundation/Foundation.h>
+#import "FIRAuthSwiftNameSupport.h"
+
NS_ASSUME_NONNULL_BEGIN
/** @class FIRUserMetdata
@brief A data class representing the metadata corresponding to a Firebase user.
*/
+FIR_SWIFT_NAME(UserMetadata)
@interface FIRUserMetadata : NSObject
/** @property lastSignInDate
diff --git a/Firebase/Auth/Source/Public/FirebaseAuth.h b/Firebase/Auth/Source/Public/FirebaseAuth.h
index 15699ff..0cc5905 100644
--- a/Firebase/Auth/Source/Public/FirebaseAuth.h
+++ b/Firebase/Auth/Source/Public/FirebaseAuth.h
@@ -32,6 +32,7 @@
#import "FIRTwitterAuthProvider.h"
#import "FIRUser.h"
#import "FIRUserInfo.h"
+#import "FIRUserMetadata.h"
#if TARGET_OS_IOS
#import "FIRAuthUIDelegate.h"